scsi: relax spdk_scsi_task_gather_data assert
If the iov_len is 0, it is OK for the iov_base to be NULL. Reported-by: Yi Ren <yunye.ry@alibaba-inc.com> Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I45c9be68fc2975bf2abd91a9d77935ce516c5210 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6706 Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
24014d63bd
commit
22e5037e0c
@ -158,7 +158,8 @@ spdk_scsi_task_gather_data(struct spdk_scsi_task *task, int *len)
|
||||
uint8_t *buf, *pos;
|
||||
|
||||
for (i = 0; i < task->iovcnt; i++) {
|
||||
assert(iovs[i].iov_base != NULL);
|
||||
/* It is OK for iov_base to be NULL if iov_len is 0. */
|
||||
assert(iovs[i].iov_base != NULL || iovs[i].iov_len == 0);
|
||||
buf_len += iovs[i].iov_len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user