]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2020 05:59:28 +0000 (07:59 +0200)
commitb6b41444275f6969408ceaad6790512526ccf1cf
tree4136ad35512c1c921943fa37ca704b5b1963199e
parente2dc04099bedaca58031107897cad76592e1c5bd
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>
include/linux/backing-dev-defs.h
mm/backing-dev.c