Commit cf10e82b authored by David Chinner's avatar David Chinner Committed by Lachlan McIlroy

[XFS] Fix xfs_ichgtime()s broken usage of I_SYNC

The recent I_LOCK->I_SYNC changes mistakenly changed xfs_ichgtime to look
at I_SYNC instead of I_LOCK. This was incorrect and prevents newly created
inodes from moving to the dirty list. Change this to the correct check
which is for I_NEW, not I_LOCK or I_SYNC so that behaviour is correct.

SGI-PV: 974225
SGI-Modid: xfs-linux-melb:xfs-kern:30204a
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent 978c7b2f
...@@ -117,7 +117,7 @@ xfs_ichgtime( ...@@ -117,7 +117,7 @@ xfs_ichgtime(
*/ */
SYNCHRONIZE(); SYNCHRONIZE();
ip->i_update_core = 1; ip->i_update_core = 1;
if (!(inode->i_state & I_SYNC)) if (!(inode->i_state & I_NEW))
mark_inode_dirty_sync(inode); mark_inode_dirty_sync(inode);
} }
...@@ -169,7 +169,7 @@ xfs_ichgtime_fast( ...@@ -169,7 +169,7 @@ xfs_ichgtime_fast(
*/ */
SYNCHRONIZE(); SYNCHRONIZE();
ip->i_update_core = 1; ip->i_update_core = 1;
if (!(inode->i_state & I_SYNC)) if (!(inode->i_state & I_NEW))
mark_inode_dirty_sync(inode); mark_inode_dirty_sync(inode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment