]> git.baikalelectronics.ru Git - kernel.git/commit
quota: Fix bogus warning in dquot_disable()
authorJan Kara <jack@suse.cz>
Mon, 19 Dec 2016 13:01:39 +0000 (14:01 +0100)
committerJan Kara <jack@suse.cz>
Mon, 19 Dec 2016 13:01:39 +0000 (14:01 +0100)
commitacd08c9571609f222844599b8366814b9446404b
tree0eba2f2c772188890a2841751487a9d490795541
parenta9b75614f66bf188d29470516b85109ce5b04514
quota: Fix bogus warning in dquot_disable()

dquot_disable() was warning when sb_has_quota_loaded() was true when
invalidating page cache for quota files. The thinking behind this
warning was that we must have raced with somebody else turning quotas on
and this should not happen because all places modifying quota state must
hold s_umount exclusively now. However sb_has_quota_loaded() can be also
true at this point when we are just suspending quotas on remount
read-only. Just restore the behavior to situation before commit
5ee64b71d466 ("quota: Remove dqonoff_mutex") which introduced the
warning.

The code in dquot_disable() can be further simplified with the new
locking of quota state changes however let's leave that to a separate
commit that can get more testing exposure.

Fixes: 5ee64b71d46674baa8c0ce45ace72a4e566f9c97
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/dquot.c