OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e73a5e8
)
scsi: core: Add missing scsi_device_put() in scsi_host_block()
author
Ye Bin
<yebin10@huawei.com>
Fri, 17 Jul 2020 09:09:20 +0000
(17:09 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Sat, 25 Jul 2020 02:09:57 +0000
(22:09 -0400)
The scsi_host_block() case was missing in commit
4dea170f4fb2
("scsi: core:
Fix incorrect usage of shost_for_each_device").
Link:
https://lore.kernel.org/r/20200717090921.29243-1-yebin10@huawei.com
Fixes:
2bb955840c1d
("scsi: core: add scsi_host_(block,unblock) helper function")
Fixes:
4dea170f4fb2
("scsi: core: Fix incorrect usage of shost_for_each_device")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/scsi_lib.c
b/drivers/scsi/scsi_lib.c
index
be8f505
..
27b52fc
100644
(file)
--- a/
drivers/scsi/scsi_lib.c
+++ b/
drivers/scsi/scsi_lib.c
@@
-2819,8
+2819,10
@@
scsi_host_block(struct Scsi_Host *shost)
mutex_lock(&sdev->state_mutex);
ret = scsi_internal_device_block_nowait(sdev);
mutex_unlock(&sdev->state_mutex);
- if (ret)
+ if (ret) {
+ scsi_device_put(sdev);
break;
+ }
}
/*