提交 75983928 编写于 作者: J Jeff Mahoney 提交者: Linus Torvalds

reiserfs: fix up lockdep warnings

Add I_MUTEX_XATTR annotations to the inode locking in the reiserfs xattr code.
Signed-off-by: NJeff Mahoney <jeffm@suse.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9ad163ae
...@@ -484,7 +484,7 @@ reiserfs_xattr_set(struct inode *inode, const char *name, const void *buffer, ...@@ -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 */ /* Resize it so we're ok to write there */
newattrs.ia_size = buffer_size; newattrs.ia_size = buffer_size;
newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; 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); err = notify_change(fp->f_path.dentry, &newattrs);
if (err) if (err)
goto out_filp; goto out_filp;
...@@ -1223,7 +1223,8 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags) ...@@ -1223,7 +1223,8 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags)
if (!IS_ERR(dentry)) { if (!IS_ERR(dentry)) {
if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) { if (!(mount_flags & MS_RDONLY) && !dentry->d_inode) {
struct inode *inode = dentry->d_parent->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); err = inode->i_op->mkdir(inode, dentry, 0700);
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
if (err) { if (err) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册