]> bbs.cooldavid.org Git - net-next-2.6.git/commit
quota: Cleanup S_NOQUOTA handling
authorJan Kara <jack@suse.cz>
Wed, 6 Jan 2010 16:20:35 +0000 (17:20 +0100)
committerJan Kara <jack@suse.cz>
Thu, 4 Mar 2010 23:20:19 +0000 (00:20 +0100)
commit26245c949c8473ea7352907b5a54bc34487eb87f
tree1b20554c273b42f179f96a8beca9d9314e652847
parent3a5b27bf6f29574d667230c7e76e4b83fe3014e0
quota: Cleanup S_NOQUOTA handling

Cleanup handling of S_NOQUOTA inode flag and document it a bit. The flag
does not have to be set under dqptr_sem. Only functions modifying inode's
dquot pointers have to check the flag under dqptr_sem before going forward
with the modification. This way we are sure that we cannot add new dquot
pointers to the inode which is just becoming a quota file.

The good thing about this cleanup is that there are no more places in quota
code which enforce i_mutex vs. dqptr_sem lock ordering (in particular that
dqptr_sem -> i_mutex of quota file). This should silence some (false) lockdep
warnings with ext4 + quota and generally make life of some filesystems easier.

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