Commit Graph

5 Commits

Author SHA1 Message Date
Haisu Wang 15d9582320 backport mm: fix abnormal reference count of blkio
Fix the problem of system crash caused by abnormal blkio
reference count.

backport tk4 commit e782ae45da64b940818d388005be11a918fa1b6a

Signed-off-by: Haisu Wang <haisuwang@tencent.com>
2022-03-31 10:17:14 +08:00
Haisu Wang 9d953f7b95 backport blkcg: add bufio isolation based on v2 infrastructure to v1
Add buffer IO isolation based on v2 infrastructure to v1, so we
can unify the interface for dio and bufio.

backport tk4 commit 9d1a9b49ad00e3dd9d6246a3c7e291a8d5a93622

Signed-off-by: Haisu Wang <haisuwang@tencent.com>
2022-03-31 10:17:14 +08:00
Christoph Hellwig 675699b41c 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>
2021-03-16 16:27:44 +08:00
Christoph Hellwig 6dfbba543a bdi: move bdi_dev_name out of line
[ Upstream commit eb7ae5e06bb6e6ac6bb86872d27c43ebab92f6b2 ]

bdi_dev_name is not a fast path function, move it out of line.  This
prepares for using it from modular callers without having to export
an implementation detail like bdi_unknown_name.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-16 16:27:44 +08:00
Kaixu Xia 590eaf1fec Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
2021-03-16 11:01:34 +08:00