提交 0762a482 编写于 作者: H Hannes Reinecke 提交者: James Bottomley

[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: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 71fa7421
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册