diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-02 17:38:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:44 -0400 |
commit | a4ffdde6e56fdf8c34ddadc2674d6eb978083369 (patch) | |
tree | 0fa07df92d804cb7d0482135195e4835cb16403a /fs/quota | |
parent | b5fc510c48f631882ccec3c0f02a25d5b67de09f (diff) | |
download | linux-a4ffdde6e56fdf8c34ddadc2674d6eb978083369.tar.gz linux-a4ffdde6e56fdf8c34ddadc2674d6eb978083369.tar.bz2 linux-a4ffdde6e56fdf8c34ddadc2674d6eb978083369.zip |
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>
Diffstat (limited to 'fs/quota')
-rw-r--r-- | fs/quota/dquot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 437d2ca2de97..5cec3e2348f1 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -885,7 +885,7 @@ static void add_dquot_ref(struct super_block *sb, int type) spin_lock(&inode_lock); list_for_each_entry(inode, &sb->s_inodes, i_sb_list) { - if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW)) + if (inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) continue; #ifdef CONFIG_QUOTA_DEBUG if (unlikely(inode_get_rsv_space(inode) > 0)) |