From: Christoph Hellwig
mainline inclusion
from mainline-v5.11-rc1
commit f7387170339afb473a0d95b7732f904346f9795e
category: bugfix
issue: #I3ZXZF
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
-----------------------------------------------
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.de
Signed-off-by: Christoph Hellwig
Signed-off-by: Jan Kara
Signed-off-by: Ye Bin
Reviewed-by: Zhang Yi
Signed-off-by: Chen Jun
Signed-off-by: Yu Changchun
---
fs/fs-writeback.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index a0869194ab73..050d40c465bc 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2304,10 +2304,6 @@ void __mark_inode_dirty(struct inode *inode, int flags)
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;
if (dirtytime)
inode->dirtied_time_when = jiffies;
--
2.22.0