This is a note to let you know that I've just added the patch titled writeback: don't warn on an unregistered BDI in __mark_inode_dirty to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: writeback-don-t-warn-on-an-unregistered-bdi-in-__mar.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 4854300901e994f74b1801192c89cbab97d1a9da Author: Christoph Hellwig <hch@xxxxxx> Date: Mon Sep 28 14:26:13 2020 +0200 writeback: don't warn on an unregistered BDI in __mark_inode_dirty [ Upstream commit 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@xxxxxx Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Jan Kara <jack@xxxxxxx> Stable-dep-of: cbfecb927f42 ("fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 46c15dd2405c..2011199476ea 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2307,10 +2307,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;