From: Hannes Reinecke Date: Mon, 12 Jan 2009 08:28:55 +0000 (+0100) Subject: [SCSI] Check for deleted device in scsi_device_online() X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0762a4824d6c6f8eb5d2646dfda95581d99afaa5;p=linux-2.6-omap-h63xx.git [SCSI] Check for deleted device in scsi_device_online() 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 Signed-off-by: James Bottomley --- diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9576690901d..15b09266b7f 100644 --- 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) {