]> git.baikalelectronics.ru Git - kernel.git/commit
scsi_dh: get module reference outside of device handler
authorChristoph Hellwig <hch@lst.de>
Sun, 14 Sep 2014 02:41:16 +0000 (19:41 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:19:22 +0000 (11:19 +0100)
commitc77b427907631cbaf1866d7137aa840fc9e2c6a3
tree26513aa57507d3bac7e027eb8561d3d555d8f44d
parent0d9c0b0216542ea31cbe0a154ff1fb5abf86a0ad
scsi_dh: get module reference outside of device handler

We need to grab a reference to the module before calling the attach
routines to avoid a small race vs module removal.  It also cleans up
the code significantly as a side effect.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/device_handler/scsi_dh.c
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/device_handler/scsi_dh_emc.c
drivers/scsi/device_handler/scsi_dh_hp_sw.c
drivers/scsi/device_handler/scsi_dh_rdac.c