lib/scsi: Move scsi_task_free_data() in a file to remove function declaration
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I9c98ded51bf88cd199bace7b3703b86ed4a9c25b Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472519 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
16dbc19508
commit
fa2dd2722d
@ -38,7 +38,16 @@
|
||||
#include "spdk/util.h"
|
||||
|
||||
static void
|
||||
scsi_task_free_data(struct spdk_scsi_task *task);
|
||||
scsi_task_free_data(struct spdk_scsi_task *task)
|
||||
{
|
||||
if (task->alloc_len != 0) {
|
||||
spdk_dma_free(task->iov.iov_base);
|
||||
task->alloc_len = 0;
|
||||
}
|
||||
|
||||
task->iov.iov_base = NULL;
|
||||
task->iov.iov_len = 0;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_scsi_task_put(struct spdk_scsi_task *task)
|
||||
@ -85,18 +94,6 @@ spdk_scsi_task_construct(struct spdk_scsi_task *task,
|
||||
task->iovcnt = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
scsi_task_free_data(struct spdk_scsi_task *task)
|
||||
{
|
||||
if (task->alloc_len != 0) {
|
||||
spdk_dma_free(task->iov.iov_base);
|
||||
task->alloc_len = 0;
|
||||
}
|
||||
|
||||
task->iov.iov_base = NULL;
|
||||
task->iov.iov_len = 0;
|
||||
}
|
||||
|
||||
static void *
|
||||
scsi_task_alloc_data(struct spdk_scsi_task *task, uint32_t alloc_len)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user