aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2009-06-02 06:07:47 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:10 -0400
commit545b9fd3d737afc0bb5203b1e79194a471605acd (patch)
tree9b9a39b55c3145a225c5256ff2be3b07a1ee43bb /fs
parent8688b8635266cf98f00c6b0350ea2dbe7c42c321 (diff)
fs: remove incorrect I_NEW warnings
Some filesystems can call in to sync an inode that is still in the I_NEW state (eg. ext family, when mounted with -osync). This is OK because the filesystem has sole access to the new inode, so it can modify i_state without races (because no other thread should be modifying it, by definition of I_NEW). Ie. a false positive, so remove the warnings. The races are described here 7ef0d7377cb287e08f3ae94cebc919448e1f5dff, which is also where the warnings were introduced. Reported-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e0fb2e78959..efcedb6d9cb 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -289,7 +289,6 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc)
289 int ret; 289 int ret;
290 290
291 BUG_ON(inode->i_state & I_SYNC); 291 BUG_ON(inode->i_state & I_SYNC);
292 WARN_ON(inode->i_state & I_NEW);
293 292
294 /* Set I_SYNC, reset I_DIRTY */ 293 /* Set I_SYNC, reset I_DIRTY */
295 dirty = inode->i_state & I_DIRTY; 294 dirty = inode->i_state & I_DIRTY;
@@ -314,7 +313,6 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc)
314 } 313 }
315 314
316 spin_lock(&inode_lock); 315 spin_lock(&inode_lock);
317 WARN_ON(inode->i_state & I_NEW);
318 inode->i_state &= ~I_SYNC; 316 inode->i_state &= ~I_SYNC;
319 if (!(inode->i_state & I_FREEING)) { 317 if (!(inode->i_state & I_FREEING)) {
320 if (!(inode->i_state & I_DIRTY) && 318 if (!(inode->i_state & I_DIRTY) &&