diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 11:25:05 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-04 02:27:06 +0400 |
commit | f2eace23e924bd3f05aedea4fc505eb5508d2d93 (patch) | |
tree | 3e78dc1c4be979164a91665f56299e344fb6d6b6 /include/linux/fs.h | |
parent | a90b9c05df3c1e58eaedc28795d0f5abd896c098 (diff) | |
download | linux-f2eace23e924bd3f05aedea4fc505eb5508d2d93.tar.xz |
[PATCH] lockdep: annotate i_mutex
Teach special (recursive) locking code to the lock validator. Has no effect
on non-lockdep kernels.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index e04a5cfe874f..05ded9e76b23 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -543,6 +543,25 @@ struct inode { }; /* + * inode->i_mutex nesting subclasses for the lock validator: + * + * 0: the object of the current VFS operation + * 1: parent + * 2: child/target + * 3: quota file + * + * The locking order between these classes is + * parent -> child -> normal -> quota + */ +enum inode_i_mutex_lock_class +{ + I_MUTEX_NORMAL, + I_MUTEX_PARENT, + I_MUTEX_CHILD, + I_MUTEX_QUOTA +}; + +/* * NOTE: in a 32bit arch with a preemptable kernel and * an UP compile the i_size_read/write must be atomic * with respect to the local cpu (unlike with preempt disabled), |