Revision 5c81a4197de38411fe3e27f8593fff73a5d6b868 authored by Arjan van de Ven on 03 July 2006, 07:25:20 UTC, committed by Linus Torvalds on 03 July 2006, 22:27:08 UTC
The quota code plays interesting games with the lock ordering; to quote Jan: | i_mutex of inode containing quota file is acquired after all other | quota locks. i_mutex of all other inodes is acquired before quota | locks. Quota code makes sure (by resetting inode operations and | setting special flag on inode) that noone tries to enter quota code | while holding i_mutex on a quota file... The good news is that all of this special case i_mutex grabbing happens in the (per filesystem) low level quota write function. For this special case we need a new I_MUTEX_* nesting level, since this just entirely outside any of the regular VFS locking rules for i_mutex. I trust Jan on his blue eyes that this is not ever going to deadlock; and based on that the patch below is what it takes to inform lockdep of these very interesting new locking rules. The new locking rule for the I_MUTEX_QUOTA nesting level is that this is the deepest possible level of nesting for i_mutex, and that this only should be used in quota write (and possibly read) function of filesystems. This makes the lock ordering of the I_MUTEX_* levels: I_MUTEX_PARENT -> I_MUTEX_CHILD -> I_MUTEX_NORMAL -> I_MUTEX_QUOTA Has no effect on non-lockdep kernels. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 5934537
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 10.5 KB |
Makefile | -rw-r--r-- | 1.1 KB |
aes.c | -rw-r--r-- | 11.6 KB |
anubis.c | -rw-r--r-- | 27.8 KB |
api.c | -rw-r--r-- | 6.4 KB |
arc4.c | -rw-r--r-- | 2.1 KB |
blowfish.c | -rw-r--r-- | 17.5 KB |
cast5.c | -rw-r--r-- | 34.2 KB |
cast6.c | -rw-r--r-- | 21.5 KB |
cipher.c | -rw-r--r-- | 11.1 KB |
compress.c | -rw-r--r-- | 1.5 KB |
crc32c.c | -rw-r--r-- | 2.5 KB |
crypto_null.c | -rw-r--r-- | 3.3 KB |
deflate.c | -rw-r--r-- | 5.4 KB |
des.c | -rw-r--r-- | 35.4 KB |
digest.c | -rw-r--r-- | 2.8 KB |
hmac.c | -rw-r--r-- | 3.1 KB |
internal.h | -rw-r--r-- | 2.8 KB |
khazad.c | -rw-r--r-- | 51.9 KB |
md4.c | -rw-r--r-- | 6.2 KB |
md5.c | -rw-r--r-- | 7.2 KB |
michael_mic.c | -rw-r--r-- | 3.5 KB |
proc.c | -rw-r--r-- | 2.8 KB |
scatterwalk.c | -rw-r--r-- | 2.8 KB |
scatterwalk.h | -rw-r--r-- | 2.0 KB |
serpent.c | -rw-r--r-- | 20.0 KB |
sha1.c | -rw-r--r-- | 3.1 KB |
sha256.c | -rw-r--r-- | 11.0 KB |
sha512.c | -rw-r--r-- | 10.3 KB |
tcrypt.c | -rw-r--r-- | 34.3 KB |
tcrypt.h | -rw-r--r-- | 103.9 KB |
tea.c | -rw-r--r-- | 7.3 KB |
tgr192.c | -rw-r--r-- | 31.1 KB |
twofish.c | -rw-r--r-- | 45.0 KB |
wp512.c | -rw-r--r-- | 60.3 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...