Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7598392894f6455cf2114f29a98a0289df788056
Commit:     7598392894f6455cf2114f29a98a0289df788056
Parent:     9ad163ae0df8a3adab6d521475142392e3efb7a6
Author:     Jeff Mahoney <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:39:23 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:35 2007 -0700

    reiserfs: fix up lockdep warnings
    
    Add I_MUTEX_XATTR annotations to the inode locking in the reiserfs xattr 
code.
    
    Signed-off-by: Jeff Mahoney <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/reiserfs/xattr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index fab4b9b..1597f6b 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -484,7 +484,7 @@ reiserfs_xattr_set(struct inode *inode, const char *name, 
const void *buffer,
        /* Resize it so we're ok to write there */
        newattrs.ia_size = buffer_size;
        newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
-       mutex_lock(&xinode->i_mutex);
+       mutex_lock_nested(&xinode->i_mutex, I_MUTEX_XATTR);
        err = notify_change(fp->f_path.dentry, &newattrs);
        if (err)
                goto out_filp;
@@ -1223,7 +1223,8 @@ int reiserfs_xattr_init(struct super_block *s, int 
mount_flags)
                if (!IS_ERR(dentry)) {
                        if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) {
                                struct inode *inode = dentry->d_parent->d_inode;
-                               mutex_lock(&inode->i_mutex);
+                               mutex_lock_nested(&inode->i_mutex,
+                                                 I_MUTEX_XATTR);
                                err = inode->i_op->mkdir(inode, dentry, 0700);
                                mutex_unlock(&inode->i_mutex);
                                if (err) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to