diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 03:25:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 18:27:06 -0400 |
commit | f2eace23e924bd3f05aedea4fc505eb5508d2d93 (patch) | |
tree | 3e78dc1c4be979164a91665f56299e344fb6d6b6 /include/linux/fs.h | |
parent | a90b9c05df3c1e58eaedc28795d0f5abd896c098 (diff) |
[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 { | |||
543 | }; | 543 | }; |
544 | 544 | ||
545 | /* | 545 | /* |
546 | * inode->i_mutex nesting subclasses for the lock validator: | ||
547 | * | ||
548 | * 0: the object of the current VFS operation | ||
549 | * 1: parent | ||
550 | * 2: child/target | ||
551 | * 3: quota file | ||
552 | * | ||
553 | * The locking order between these classes is | ||
554 | * parent -> child -> normal -> quota | ||
555 | */ | ||
556 | enum inode_i_mutex_lock_class | ||
557 | { | ||
558 | I_MUTEX_NORMAL, | ||
559 | I_MUTEX_PARENT, | ||
560 | I_MUTEX_CHILD, | ||
561 | I_MUTEX_QUOTA | ||
562 | }; | ||
563 | |||
564 | /* | ||
546 | * NOTE: in a 32bit arch with a preemptable kernel and | 565 | * NOTE: in a 32bit arch with a preemptable kernel and |
547 | * an UP compile the i_size_read/write must be atomic | 566 | * an UP compile the i_size_read/write must be atomic |
548 | * with respect to the local cpu (unlike with preempt disabled), | 567 | * with respect to the local cpu (unlike with preempt disabled), |