block: Dynamically allocate and refcount backing_dev_info
authorJan Kara <jack@suse.cz>
Thu, 2 Feb 2017 14:56:51 +0000 (15:56 +0100)
committerJens Axboe <axboe@fb.com>
Thu, 2 Feb 2017 15:20:50 +0000 (08:20 -0700)
commitd03f6cdc1fc422accb734c7c07a661a0018d8631
treefe3500795df51b8ad11a0f76dddfa27d60fecf13
parentdc3b17cc8bf21307c7e076e7c778d5db756f7871
block: Dynamically allocate and refcount backing_dev_info

Instead of storing backing_dev_info inside struct request_queue,
allocate it dynamically, reference count it, and free it when the last
reference is dropped. Currently only request_queue holds the reference
but in the following patch we add other users referencing
backing_dev_info.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c
block/blk-sysfs.c
include/linux/backing-dev-defs.h
include/linux/backing-dev.h
include/linux/blkdev.h
mm/backing-dev.c