diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-13 18:33:38 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-13 18:33:38 -0500 |
commit | 09ac46c429464c919d04bb737b27edd84d944f02 (patch) | |
tree | 0fb3b7344ead06d08dbd77470445821817c439b7 /drivers/scsi | |
parent | 6e736be7f282fff705db7c34a15313281b372a76 (diff) |
block: misc updates to blk_get_queue()
* blk_get_queue() is peculiar in that it returns 0 on success and 1 on
failure instead of 0 / -errno or boolean. Update it such that it
returns %true on success and %false on failure.
* Make sure the caller checks for the return value.
* Separate out __blk_get_queue() which doesn't check whether @q is
dead and put it in blk.h. This will be used later.
This patch doesn't introduce any functional changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index b3c6d957fbd8..89da43f73c00 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -297,7 +297,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, | |||
297 | kfree(sdev); | 297 | kfree(sdev); |
298 | goto out; | 298 | goto out; |
299 | } | 299 | } |
300 | blk_get_queue(sdev->request_queue); | 300 | WARN_ON_ONCE(!blk_get_queue(sdev->request_queue)); |
301 | sdev->request_queue->queuedata = sdev; | 301 | sdev->request_queue->queuedata = sdev; |
302 | scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); | 302 | scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); |
303 | 303 | ||