]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - block/blk-mq.c
blk-mq: allow blk_mq_init_commands() to return failure
authorJens Axboe <axboe@fb.com>
Fri, 14 Mar 2014 16:43:15 +0000 (10:43 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 14 Mar 2014 16:43:15 +0000 (10:43 -0600)
commit95363efde193079541cb379eb47140e9c4d355d5
treeda7417035ca5f25d6818430feaa54cb09a2ba86d
parent89f8b33ca1ea881d1d84542282cb85d07d02e78d
blk-mq: allow blk_mq_init_commands() to return failure

If drivers do dynamic allocation in the hardware command init
path, then we need to be able to handle and return failures.

And if they do allocations or mappings in the init command path,
then we need a cleanup function to free up that space at exit
time. So add blk_mq_free_commands() as the cleanup function.

This is required for the mtip32xx driver conversion to blk-mq.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c
drivers/block/virtio_blk.c
include/linux/blk-mq.h