]> git.baikalelectronics.ru Git - kernel.git/commit
block: simplify blk_init_allocated_queue
authorChristoph Hellwig <hch@lst.de>
Tue, 3 Jan 2017 11:52:44 +0000 (14:52 +0300)
committerJens Axboe <axboe@fb.com>
Fri, 27 Jan 2017 22:08:35 +0000 (15:08 -0700)
commite6caab1d34a0c2a6319c15358d86699715e9c7b4
tree0b1595694cc628134ccb108f256beed8831887bf
parent43782689eaf48c2bf55f057d2ff8169bc5c365fd
block: simplify blk_init_allocated_queue

Return an errno value instead of the passed in queue so that the callers
don't have to keep track of two queues, and move the assignment of the
request_fn and lock to the caller as passing them as argument doesn't
simplify anything.  While we're at it also remove two pointless NULL
assignments, given that the request structure is zeroed on allocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
drivers/md/dm-rq.c
include/linux/blkdev.h