Skip to content

Commit

Permalink
quota: add possibly missing iput() when quotaon and quotaoff races
Browse files Browse the repository at this point in the history
We should always put inode we have reference to, even if quota was reenabled
in the mean time.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Kara authored and Linus Torvalds committed Mar 20, 2008
1 parent 52ea27e commit 87cb055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/dquot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1522,8 +1522,8 @@ int vfs_quota_off(struct super_block *sb, int type)
truncate_inode_pages(&toputinode[cnt]->i_data, 0);
mutex_unlock(&toputinode[cnt]->i_mutex);
mark_inode_dirty(toputinode[cnt]);
iput(toputinode[cnt]);
}
iput(toputinode[cnt]);
mutex_unlock(&dqopt->dqonoff_mutex);
}
if (sb->s_bdev)
Expand Down

0 comments on commit 87cb055

Please sign in to comment.