[PATCH] Remove bogus warning in __mark_inode_dirty().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
 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)




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux