Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178718
b: refs/heads/master
c: 47376ce
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker committed Dec 16, 2009
1 parent c3b636d commit b29f0be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb1c2e51c5a72f093b5af384b11d2f1c2abd6c13
refs/heads/master: 47376ceba54600cec4dd9e7c4fe8b98e4269633a
3 changes: 2 additions & 1 deletion trunk/fs/reiserfs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ static int reiserfs_for_each_xattr(struct inode *inode,
goto out_dir;
}

mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
reiserfs_mutex_lock_nested_safe(&dir->d_inode->i_mutex, I_MUTEX_XATTR,
inode->i_sb);
buf.xadir = dir;
err = reiserfs_readdir_dentry(dir, &buf, fill_with_dentries, &pos);
while ((err == 0 || err == -ENOSPC) && buf.count) {
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/reiserfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ static inline void reiserfs_mutex_lock_safe(struct mutex *m,
reiserfs_write_lock(s);
}

static inline void
reiserfs_mutex_lock_nested_safe(struct mutex *m, unsigned int subclass,
struct super_block *s)
{
reiserfs_write_unlock(s);
mutex_lock_nested(m, subclass);
reiserfs_write_lock(s);
}

/*
* When we schedule, we usually want to also release the write lock,
* according to the previous bkl based locking scheme of reiserfs.
Expand Down

0 comments on commit b29f0be

Please sign in to comment.