summaryrefslogtreecommitdiff
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-02-02 15:56:51 +0100
committerJens Axboe <axboe@fb.com>2017-02-02 08:20:50 -0700
commitd03f6cdc1fc422accb734c7c07a661a0018d8631 (patch)
treefe3500795df51b8ad11a0f76dddfa27d60fecf13 /block/blk-sysfs.c
parentdc3b17cc8bf21307c7e076e7c778d5db756f7871 (diff)
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>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 05841be1f30f..3e204789b8d3 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -799,7 +799,7 @@ static void blk_release_queue(struct kobject *kobj)
container_of(kobj, struct request_queue, kobj);
wbt_exit(q);
- bdi_exit(q->backing_dev_info);
+ bdi_put(q->backing_dev_info);
blkcg_exit_queue(q);
if (q->elevator) {