simplify checks for I_CLEAR/I_FREEING
add I_CLEAR instead of replacing I_FREEING with it. I_CLEAR is equivalent to I_FREEING for almost all code looking at either; it's there to keep track of having called clear_inode() exactly once per inode lifetime, at some point after having set I_FREEING. I_CLEAR and I_FREEING never get set at the same time with the current code, so we can switch to setting i_flags to I_FREEING | I_CLEAR instead of I_CLEAR without loss of information. As the result of such change, checks become simpler and the amount of code that needs to know about I_CLEAR shrinks a lot. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -80,7 +80,7 @@ xfs_mark_inode_dirty_sync(
|
||||
{
|
||||
struct inode *inode = VFS_I(ip);
|
||||
|
||||
if (!(inode->i_state & (I_WILL_FREE|I_FREEING|I_CLEAR)))
|
||||
if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
|
||||
mark_inode_dirty_sync(inode);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ xfs_mark_inode_dirty(
|
||||
{
|
||||
struct inode *inode = VFS_I(ip);
|
||||
|
||||
if (!(inode->i_state & (I_WILL_FREE|I_FREEING|I_CLEAR)))
|
||||
if (!(inode->i_state & (I_WILL_FREE|I_FREEING)))
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user