Revert "scsi: Fix seg.fault due to the gap between IO channel put and LUN removal"
This reverts commit 8f33ac020d
.
Causing build pool failures
Change-Id: Ib0dd2be4c327d76f67a00aec8a7c26f25bbaeb10
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467873
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mike Carlin <mikefcarlin@protonmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
1771381d54
commit
a34248d38f
@ -411,19 +411,11 @@ spdk_scsi_dev_get_id(const struct spdk_scsi_dev *dev)
|
||||
struct spdk_scsi_lun *
|
||||
spdk_scsi_dev_get_lun(struct spdk_scsi_dev *dev, int lun_id)
|
||||
{
|
||||
struct spdk_scsi_lun *lun;
|
||||
|
||||
if (lun_id < 0 || lun_id >= SPDK_SCSI_DEV_MAX_LUN) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lun = dev->lun[lun_id];
|
||||
|
||||
if (lun != NULL && !spdk_scsi_lun_is_removing(lun)) {
|
||||
return lun;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
return dev->lun[lun_id];
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user