reiserfs: suppress lockdep warning
authorJeff Mahoney <jeffm@suse.de>
Mon, 30 Apr 2007 22:09:50 +0000 (15:09 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 30 Apr 2007 23:40:40 +0000 (16:40 -0700)
We're getting lockdep warnings due to a post-2.6.21-rc7 bugfix.

The xattr_sem can never be taken in the manner described. Internal inodes
are protected by I_PRIVATE.  Add the appropriate annotation.

Cc: <stable@kernel.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/reiserfs/xattr.c

index c8178b7b92123d3474fb40979ee2c596c432d099..2cac56210e2b1a7aee37fc373ca222714f8b5030 100644 (file)
@@ -68,7 +68,7 @@ static struct dentry *get_xa_root(struct super_block *sb, int flags)
        if (!privroot)
                return ERR_PTR(-ENODATA);
 
-       mutex_lock(&privroot->d_inode->i_mutex);
+       mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
        if (REISERFS_SB(sb)->xattr_root) {
                xaroot = dget(REISERFS_SB(sb)->xattr_root);
                goto out;