mirror of https://gitee.com/openkylin/linux.git
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:
parent
52ea27eb4c
commit
87cb055bc1
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue