aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 00:25:05 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 15:27:06 -0700
commitf2eace23e924bd3f05aedea4fc505eb5508d2d93 (patch)
tree3e78dc1c4be979164a91665f56299e344fb6d6b6 /include/linux
parenta90b9c05df3c1e58eaedc28795d0f5abd896c098 (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')
-rw-r--r--include/linux/fs.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e04a5cfe874..05ded9e76b2 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),