All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: create sysfs file, dh_state for SCSI devices even if they are not in the inteernal lists
@ 2009-06-27  2:31 Chandra Seetharaman
  2009-06-29  7:40 ` [dm-devel] " Hannes Reinecke
  2009-09-11 17:20 ` [RESEND] [PATCH]: scsi_dh: create sysfs file, dh_state for SCSI devices even if they are not in the internal lists Chandra Seetharaman
  0 siblings, 2 replies; 9+ messages in thread
From: Chandra Seetharaman @ 2009-06-27  2:31 UTC (permalink / raw)
  To: linux-scsi; +Cc: dm-devel, Mario Mech

Create the sysfs file, dh_state even if the new SCSI device is not
in the any of the device handler's internal lists.

Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
 drivers/scsi/device_handler/scsi_dh.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Index: linux-2.6.31-rc1/drivers/scsi/device_handler/scsi_dh.c
===================================================================
--- linux-2.6.31-rc1.orig/drivers/scsi/device_handler/scsi_dh.c
+++ linux-2.6.31-rc1/drivers/scsi/device_handler/scsi_dh.c
@@ -304,18 +304,15 @@ static int scsi_dh_notifier(struct notif
 	sdev = to_scsi_device(dev);
 
 	if (action == BUS_NOTIFY_ADD_DEVICE) {
+		err = device_create_file(dev, &scsi_dh_state_attr);
+		/* don't care about err */
 		devinfo = device_handler_match(NULL, sdev);
-		if (!devinfo)
-			goto out;
-
-		err = scsi_dh_handler_attach(sdev, devinfo);
-		if (!err)
-			err = device_create_file(dev, &scsi_dh_state_attr);
+		if (devinfo)
+			err = scsi_dh_handler_attach(sdev, devinfo);
 	} else if (action == BUS_NOTIFY_DEL_DEVICE) {
 		device_remove_file(dev, &scsi_dh_state_attr);
 		scsi_dh_handler_detach(sdev, NULL);
 	}
-out:
 	return err;
 }
 



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-11 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27  2:31 [PATCH]: create sysfs file, dh_state for SCSI devices even if they are not in the inteernal lists Chandra Seetharaman
2009-06-29  7:40 ` [dm-devel] " Hannes Reinecke
2009-06-29 16:09   ` James Bottomley
2009-06-30  6:39     ` Hannes Reinecke
2009-06-29 19:30   ` Chandra Seetharaman
2009-07-07 19:43     ` [dm-devel] " Chandra Seetharaman
2009-08-03 19:51     ` Chandra Seetharaman
2009-08-11  8:54       ` Hannes Reinecke
2009-09-11 17:20 ` [RESEND] [PATCH]: scsi_dh: create sysfs file, dh_state for SCSI devices even if they are not in the internal lists Chandra Seetharaman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.