aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-10 20:41:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-10 20:41:47 -0400
commit3259b12ae1c79c146809829412ddc0d11a1b8e26 (patch)
tree6f11934a3ed95b0baac0e4c317d2a0df386ebbf5 /drivers/misc
parent49850a147c9cba958ce411f93f2aa6d4d92fe5e3 (diff)
parentbba0bdd7ad4713d82338bcd9b72d57e9335a664b (diff)
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "This is our remaining set of three fixes for 4.0: two oops fixes(one for cable pulls triggering oopses and the other be2iscsi specific) and one warn on in sysfs on multipath devices using enclosures" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: Defer processing of REQ_PREEMPT requests for blocked devices be2iscsi: Fix kernel panic when device initialization fails enclosure: fix WARN_ON removing an adapter in multi-path devices
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/enclosure.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 38552a31304a..65fed7146e9b 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -202,16 +202,17 @@ static void enclosure_remove_links(struct enclosure_component *cdev)
202{ 202{
203 char name[ENCLOSURE_NAME_SIZE]; 203 char name[ENCLOSURE_NAME_SIZE];
204 204
205 enclosure_link_name(cdev, name);
206
205 /* 207 /*
206 * In odd circumstances, like multipath devices, something else may 208 * In odd circumstances, like multipath devices, something else may
207 * already have removed the links, so check for this condition first. 209 * already have removed the links, so check for this condition first.
208 */ 210 */
209 if (!cdev->dev->kobj.sd) 211 if (cdev->dev->kobj.sd)
210 return; 212 sysfs_remove_link(&cdev->dev->kobj, name);
211 213
212 enclosure_link_name(cdev, name); 214 if (cdev->cdev.kobj.sd)
213 sysfs_remove_link(&cdev->dev->kobj, name); 215 sysfs_remove_link(&cdev->cdev.kobj, "device");
214 sysfs_remove_link(&cdev->cdev.kobj, "device");
215} 216}
216 217
217static int enclosure_add_links(struct enclosure_component *cdev) 218static int enclosure_add_links(struct enclosure_component *cdev)