]> git.baikalelectronics.ru Git - kernel.git/commit
bdi: add a ->dev_name field to struct backing_dev_info
authorChristoph Hellwig <hch@lst.de>
Mon, 4 May 2020 12:47:56 +0000 (14:47 +0200)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:07:57 +0000 (16:07 -0600)
commitd8b786bbdc1db4e131dc8c53548affc38b433f8b
tree27ebe54b5fbc4083760df21ddd65d6d3ecc17dbd
parentdbfc0c34310e8fa3359c64e75f9e93adeba65090
bdi: add a ->dev_name field to struct backing_dev_info

Cache a copy of the name for the life time of the backing_dev_info
structure so that we can reference it even after unregistering.

Fixes: 72e7720691f5 ("memcg: fix a crash in wb_workfn when a device disappears")
Reported-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/backing-dev-defs.h
mm/backing-dev.c