提交 93832e3e 编写于 作者: C Christoph Hellwig 提交者: Zheng Zengkai

writeback: don't warn on an unregistered BDI in __mark_inode_dirty

mainline inclusion
from mainline-v5.11-rc1
commit f7387170
category: bugfix
bugzilla: 172157 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f7387170339afb473a0d95b7732f904346f9795e

-----------------------------------------------

BDIs get unregistered during device removal, and this WARN can be
trivially triggered by hot-removing a NVMe device while running fsx
It is otherwise harmless as we still hold a BDI reference, and the
writeback has been shut down already.

Link: https://lore.kernel.org/r/20200928122613.434820-1-hch@lst.deSigned-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJan Kara <jack@suse.cz>
Signed-off-by: NYe Bin <yebin10@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9a2591ba
...@@ -2298,10 +2298,6 @@ void __mark_inode_dirty(struct inode *inode, int flags) ...@@ -2298,10 +2298,6 @@ void __mark_inode_dirty(struct inode *inode, int flags)
wb = locked_inode_to_wb_and_lock_list(inode); wb = locked_inode_to_wb_and_lock_list(inode);
WARN((wb->bdi->capabilities & BDI_CAP_WRITEBACK) &&
!test_bit(WB_registered, &wb->state),
"bdi-%s not registered\n", bdi_dev_name(wb->bdi));
inode->dirtied_when = jiffies; inode->dirtied_when = jiffies;
if (dirtytime) if (dirtytime)
inode->dirtied_time_when = jiffies; inode->dirtied_time_when = jiffies;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册