]> git.baikalelectronics.ru Git - kernel.git/commit
quota: Fix warning when a delayed write happens before quota is enabled
authorJan Kara <jack@suse.cz>
Tue, 9 Feb 2010 17:20:39 +0000 (18:20 +0100)
committerJan Kara <jack@suse.cz>
Thu, 4 Mar 2010 23:20:21 +0000 (00:20 +0100)
commit13a17a25b157c95a1e44ca0d900ca7aea98098ca
tree8df303b6fe335d825cedbfa8cde5bd76c7f53742
parent72e113e7497c80fe1b6a3a742c52176498ab5e22
quota: Fix warning when a delayed write happens before quota is enabled

If a delayed-allocation write happens before quota is enabled, the
kernel spits out a warning:
WARNING: at fs/quota/dquot.c:988 dquot_claim_space+0x77/0x112()

because the fact that user has some delayed allocation is not recorded
in quota structure.

Make dquot_initialize() update amount of reserved space for user if it sees
inode has some space reserved. Also make sure that reserved quota space does
not go negative and we warn about the filesystem bug just once.

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