diff options
author | Nick Piggin <npiggin@suse.de> | 2009-06-02 12:07:47 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:10 -0400 |
commit | 545b9fd3d737afc0bb5203b1e79194a471605acd (patch) | |
tree | 9b9a39b55c3145a225c5256ff2be3b07a1ee43bb /fs/fs-writeback.c | |
parent | 8688b8635266cf98f00c6b0350ea2dbe7c42c321 (diff) | |
download | op-kernel-dev-545b9fd3d737afc0bb5203b1e79194a471605acd.zip op-kernel-dev-545b9fd3d737afc0bb5203b1e79194a471605acd.tar.gz |
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/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e0fb2e7..efcedb6 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) int ret; BUG_ON(inode->i_state & I_SYNC); - WARN_ON(inode->i_state & I_NEW); /* Set I_SYNC, reset I_DIRTY */ dirty = inode->i_state & I_DIRTY; @@ -314,7 +313,6 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc) } spin_lock(&inode_lock); - WARN_ON(inode->i_state & I_NEW); inode->i_state &= ~I_SYNC; if (!(inode->i_state & I_FREEING)) { if (!(inode->i_state & I_DIRTY) && |