[PATCH] lockdep: annotate sb ->s_umount
[safe/jmp/linux-2.6] / include / linux / fs.h
index e04a5cf..e26de68 100644 (file)
@@ -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),
@@ -1276,6 +1295,8 @@ struct file_system_type {
        struct module *owner;
        struct file_system_type * next;
        struct list_head fs_supers;
+       struct lock_class_key s_lock_key;
+       struct lock_class_key s_umount_key;
 };
 
 extern int get_sb_bdev(struct file_system_type *fs_type,