summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-04 14:47:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-08 08:54:29 +0200
commitd6c434ae9d3b5cd1fcb8e3aa28172f3d79d81641 (patch)
tree194bc9a73bf569e36942e5e7afe9ac21faeb1ec8 /include
parent19a845e19ded4f81dad2a0941f44fb668ed25564 (diff)
downloadlinux-stable-d6c434ae9d3b5cd1fcb8e3aa28172f3d79d81641.tar.gz
linux-stable-d6c434ae9d3b5cd1fcb8e3aa28172f3d79d81641.tar.bz2
linux-stable-d6c434ae9d3b5cd1fcb8e3aa28172f3d79d81641.zip
bdi: add a ->dev_name field to struct backing_dev_info
[ Upstream commit 6bd87eec23cbc9ed222bed0f5b5b02bf300e9a8d ] 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: 68f23b89067f ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/backing-dev-defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index 07e02d6df5ad..65d47522413c 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -197,6 +197,7 @@ struct backing_dev_info {
wait_queue_head_t wb_waitq;
struct device *dev;
+ char dev_name[64];
struct device *owner;
struct timer_list laptop_mode_wb_timer;