quota: add possibly missing iput() when quotaon and quotaoff races

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>
This commit is contained in:
Jan Kara 2008-03-19 17:00:46 -07:00 committed by Linus Torvalds
parent 52ea27eb4c
commit 87cb055bc1
1 changed files with 1 additions and 1 deletions

View File

@ -1522,8 +1522,8 @@ int vfs_quota_off(struct super_block *sb, int type)
truncate_inode_pages(&toputinode[cnt]->i_data, 0); truncate_inode_pages(&toputinode[cnt]->i_data, 0);
mutex_unlock(&toputinode[cnt]->i_mutex); mutex_unlock(&toputinode[cnt]->i_mutex);
mark_inode_dirty(toputinode[cnt]); mark_inode_dirty(toputinode[cnt]);
iput(toputinode[cnt]);
} }
iput(toputinode[cnt]);
mutex_unlock(&dqopt->dqonoff_mutex); mutex_unlock(&dqopt->dqonoff_mutex);
} }
if (sb->s_bdev) if (sb->s_bdev)