]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] lockdep: annotate reiserfs
authorIngo Molnar <mingo@elte.hu>
Sun, 27 Aug 2006 08:23:56 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:32 +0000 (11:01 -0700)
reiserfs seems to have another locking level layer for the i_mutex due to the
xattrs-are-a-directory thing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/reiserfs/xattr.c
include/linux/fs.h

index 39fedaa88a0c13f3c081c98c7b0b37ea120504be..d935fb9394e360866cfa650ca6704bdd229c044d 100644 (file)
@@ -424,7 +424,7 @@ int xattr_readdir(struct file *file, filldir_t filler, void *buf)
        int res = -ENOTDIR;
        if (!file->f_op || !file->f_op->readdir)
                goto out;
-       mutex_lock(&inode->i_mutex);
+       mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
 //        down(&inode->i_zombie);
        res = -ENOENT;
        if (!IS_DEADDIR(inode)) {
index 25610205c90d09e75ea827ae83ca0ebc9dc3445f..555bc195c4207cbecf1dba61a43268a1e7692326 100644 (file)
@@ -570,13 +570,14 @@ struct inode {
  * 3: quota file
  *
  * The locking order between these classes is
- * parent -> child -> normal -> quota
+ * parent -> child -> normal -> xattr -> quota
  */
 enum inode_i_mutex_lock_class
 {
        I_MUTEX_NORMAL,
        I_MUTEX_PARENT,
        I_MUTEX_CHILD,
+       I_MUTEX_XATTR,
        I_MUTEX_QUOTA
 };