linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove bogus warning in __mark_inode_dirty().
@ 2020-03-30 15:13 Anton Altaparmakov
  0 siblings, 0 replies; only message in thread
From: Anton Altaparmakov @ 2020-03-30 15:13 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, Anton Altaparmakov, stable

The warning about "bdi-%s not registered" in __mark_inode_dirty()
is incorrect and can relatively easily be triggered during failsafe
testing of any file system where the test involves unplugging the
storage without unmounting in the middle of write operations.

Even if the filesystem checks "is device not unplugged" before calling
__mark_inode_dirty() the device unplug can happen after this check has
been performed but before __mark_inode_dirty() gets to the check inside
the WARN().

Thus this patch simply removes this warning as it is perfectly normal
thing to happen when volume is unplugged whilst being written to.

Signed-off-by: Anton Altaparmakov <anton@tuxera.com>
Cc: stable@vger.kernel.org
---
 fs/fs-writeback.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 76ac9c7d32ec..443134d3dbf3 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2318,10 +2318,6 @@ void __mark_inode_dirty(struct inode *inode, int flags)
 
 			wb = locked_inode_to_wb_and_lock_list(inode);
 
-			WARN(bdi_cap_writeback_dirty(wb->bdi) &&
-			     !test_bit(WB_registered, &wb->state),
-			     "bdi-%s not registered\n", wb->bdi->name);
-
 			inode->dirtied_when = jiffies;
 			if (dirtytime)
 				inode->dirtied_time_when = jiffies;
-- 
2.24.1 (Apple Git-126)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-30 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 15:13 [PATCH] Remove bogus warning in __mark_inode_dirty() Anton Altaparmakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).