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>
This commit is contained in:
Jan Kara 2017-02-02 15:56:51 +01:00 committed by Jens Axboe
parent dc3b17cc8b
commit d03f6cdc1f
6 changed files with 50 additions and 11 deletions

View file

@ -433,7 +433,6 @@ struct request_queue {
struct delayed_work delay_work;
struct backing_dev_info *backing_dev_info;
struct backing_dev_info _backing_dev_info;
/*
* The queue owner gets to use this for whatever they like.