sd: don't grab a device references from driver methods
authorChristoph Hellwig <hch@lst.de>
Mon, 2 Feb 2015 13:01:25 +0000 (14:01 +0100)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 19 Mar 2015 13:40:53 +0000 (06:40 -0700)
commit3d9a1f530e508ff6fc9ab8220016b02f1bce255b
treeafcdbfbdaea6b1a604dbc62f1f17d7da4fec7de5
parente27829dc92e549486b8248cdfa53e108abb6acfb
sd: don't grab a device references from driver methods

The device model already takes care of races between ->remove and
->shutdown vs its other methods, and we now take care about locking
them out for ->rescan as well.

This is a partial revert of commit 39b7f1 ("[SCSI] sd: Fix refcounting").

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sd.c