diff options
author | Jeff Mahoney <jeffm@suse.com> | 2007-10-19 02:39:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:35 -0400 |
commit | 7598392894f6455cf2114f29a98a0289df788056 (patch) | |
tree | b6bef139021d0d82aa985f243a5c9acc6c7a1907 | |
parent | 9ad163ae0df8a3adab6d521475142392e3efb7a6 (diff) |
reiserfs: fix up lockdep warnings
Add I_MUTEX_XATTR annotations to the inode locking in the reiserfs xattr code.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | 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 fab4b9b2664f..1597f6b649e0 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, | |||
484 | /* Resize it so we're ok to write there */ | 484 | /* Resize it so we're ok to write there */ |
485 | newattrs.ia_size = buffer_size; | 485 | newattrs.ia_size = buffer_size; |
486 | newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; | 486 | newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; |
487 | mutex_lock(&xinode->i_mutex); | 487 | mutex_lock_nested(&xinode->i_mutex, I_MUTEX_XATTR); |
488 | err = notify_change(fp->f_path.dentry, &newattrs); | 488 | err = notify_change(fp->f_path.dentry, &newattrs); |
489 | if (err) | 489 | if (err) |
490 | goto out_filp; | 490 | goto out_filp; |
@@ -1223,7 +1223,8 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags) | |||
1223 | if (!IS_ERR(dentry)) { | 1223 | if (!IS_ERR(dentry)) { |
1224 | if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) { | 1224 | if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) { |
1225 | struct inode *inode = dentry->d_parent->d_inode; | 1225 | struct inode *inode = dentry->d_parent->d_inode; |
1226 | mutex_lock(&inode->i_mutex); | 1226 | mutex_lock_nested(&inode->i_mutex, |
1227 | I_MUTEX_XATTR); | ||
1227 | err = inode->i_op->mkdir(inode, dentry, 0700); | 1228 | err = inode->i_op->mkdir(inode, dentry, 0700); |
1228 | mutex_unlock(&inode->i_mutex); | 1229 | mutex_unlock(&inode->i_mutex); |
1229 | if (err) { | 1230 | if (err) { |