remove a useless get/put_device pair in scsi_request_fn
authorBart Van Assche <bvanassche@acm.org>
Thu, 20 Feb 2014 22:20:56 +0000 (14:20 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:12:26 +0000 (12:12 -0600)
commitf4075067199b3eda79b67844a87a9cddedadb40c
treeeed901b0b488a58746672f2662df94c9922a3ed5
parent100414ed6f900dfefaad203f2883d2c17bc03faa
remove a useless get/put_device pair in scsi_request_fn

SCSI devices may only be removed by calling scsi_remove_device().
That function must invoke blk_cleanup_queue() before the final put
of sdev->sdev_gendev. Since blk_cleanup_queue() waits for the
block queue to drain and then tears it down, scsi_request_fn cannot
be active anymore after blk_cleanup_queue() has returned and hence
the get_device()/put_device() pair in scsi_request_fn is unnecessary.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c