[PATCH] scsi: Fix kabi change due to add offline_already member in struct scsi_device

From: Ye Bin <yebin10@huawei.com> hulk inclusion category: bugfix bugzilla: 34604 CVE: NA ----------------------------------------------- Signed-off-by: Ye Bin <yebin10@huawei.com> Reviewed-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/scsi/scsi_lib.c | 4 ++-- include/scsi/scsi_device.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a8043039f53e..bdb90f5c9eeb 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1438,7 +1438,7 @@ scsi_prep_state_check(struct scsi_device *sdev, struct request *req) * before trying any recovery commands. */ if (!sdev->offline_already) { - sdev->offline_already = true; + sdev->offline_already = 1; sdev_printk(KERN_ERR, sdev, "rejecting I/O to offline device\n"); } @@ -2859,7 +2859,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state) break; } - sdev->offline_already = false; + sdev->offline_already = 0; sdev->sdev_state = state; return 0; diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 52b255e868a9..550739a5ea96 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -201,8 +201,6 @@ struct scsi_device { unsigned lun_in_cdb:1; /* Store LUN bits in CDB[1] */ unsigned unmap_limit_for_ws:1; /* Use the UNMAP limit for WRITE SAME */ - bool offline_already; /* Device offline message logged */ - atomic_t disk_events_disable_depth; /* disable depth for disk events */ DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ @@ -230,8 +228,11 @@ struct scsi_device { struct mutex state_mutex; enum scsi_device_state sdev_state; struct task_struct *quiesced_by; - +#ifndef __GENKSYMS__ + unsigned long offline_already; /* Device offline message logged */ +#else KABI_RESERVE(1) +#endif KABI_RESERVE(2) KABI_RESERVE(3) KABI_RESERVE(4) -- 2.25.1
participants (1)
-
Yang Yingliang