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>
Showing
- block/blk-core.c 5 additions, 7 deletionsblock/blk-core.c
- block/blk-sysfs.c 1 addition, 1 deletionblock/blk-sysfs.c
- include/linux/backing-dev-defs.h 2 additions, 0 deletionsinclude/linux/backing-dev-defs.h
- include/linux/backing-dev.h 9 additions, 1 deletioninclude/linux/backing-dev.h
- include/linux/blkdev.h 0 additions, 1 deletioninclude/linux/blkdev.h
- mm/backing-dev.c 33 additions, 1 deletionmm/backing-dev.c
Loading
Please register or sign in to comment