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 /include/linux/blkdev.h | |
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 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8c8dbc4738ea..d1b6f4ed1f96 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -865,7 +865,7 @@ extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatte | |||
865 | extern void blk_dump_rq_flags(struct request *, char *); | 865 | extern void blk_dump_rq_flags(struct request *, char *); |
866 | extern long nr_blockdev_pages(void); | 866 | extern long nr_blockdev_pages(void); |
867 | 867 | ||
868 | int blk_get_queue(struct request_queue *); | 868 | bool __must_check blk_get_queue(struct request_queue *); |
869 | struct request_queue *blk_alloc_queue(gfp_t); | 869 | struct request_queue *blk_alloc_queue(gfp_t); |
870 | struct request_queue *blk_alloc_queue_node(gfp_t, int); | 870 | struct request_queue *blk_alloc_queue_node(gfp_t, int); |
871 | extern void blk_put_queue(struct request_queue *); | 871 | extern void blk_put_queue(struct request_queue *); |