diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-14 03:33:38 +0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-14 03:33:38 +0400 |
commit | 09ac46c429464c919d04bb737b27edd84d944f02 (patch) | |
tree | 0fb3b7344ead06d08dbd77470445821817c439b7 /block/genhd.c | |
parent | 6e736be7f282fff705db7c34a15313281b372a76 (diff) | |
download | linux-09ac46c429464c919d04bb737b27edd84d944f02.tar.xz |
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 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c index 02e9fca80825..c958169d24f0 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -615,7 +615,7 @@ void add_disk(struct gendisk *disk) * Take an extra ref on queue which will be put on disk_release() * so that it sticks around as long as @disk is there. */ - WARN_ON_ONCE(blk_get_queue(disk->queue)); + WARN_ON_ONCE(!blk_get_queue(disk->queue)); retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj, "bdi"); |