projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
71fa742
)
[SCSI] Check for deleted device in scsi_device_online()
author
Hannes Reinecke
<hare@suse.de>
Mon, 12 Jan 2009 08:28:55 +0000
(09:28 +0100)
committer
James Bottomley
<James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:57:56 +0000
(12:57 -0500)
scsi_device_online() is not just a negation of SDEV_OFFLINE,
also devices in state SDEV_DEL are actually offline.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
include/scsi/scsi_device.h
patch
|
blob
|
history
diff --git
a/include/scsi/scsi_device.h
b/include/scsi/scsi_device.h
index 9576690901dd6176e6ca4b081e8490b2242ead43..15b09266b7ff407300adf8b3fc3f9e7dc64def22 100644
(file)
--- a/
include/scsi/scsi_device.h
+++ b/
include/scsi/scsi_device.h
@@
-401,7
+401,8
@@
static inline unsigned int sdev_id(struct scsi_device *sdev)
*/
static inline int scsi_device_online(struct scsi_device *sdev)
{
- return sdev->sdev_state != SDEV_OFFLINE;
+ return (sdev->sdev_state != SDEV_OFFLINE &&
+ sdev->sdev_state != SDEV_DEL);
}
static inline int scsi_device_blocked(struct scsi_device *sdev)
{