diff options
author | Jan Kara <jack@suse.cz> | 2013-08-09 10:49:58 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-08-09 10:49:58 +0200 |
commit | 97a2847d064e2fdd2e3cd4ff14cad2f377f0677a (patch) | |
tree | e49ce105dc6febc25dc3ceba6070ea3998c7330c /fs/reiserfs/dir.c | |
parent | e99a03c6f50a699d63b5751e3e88f84e43b037a7 (diff) | |
parent | d2d0395fd1778d4bf714adc5bfd23a5d748d7802 (diff) | |
download | linux-97a2847d064e2fdd2e3cd4ff14cad2f377f0677a.tar.gz |
Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeffm/linux-reiserfs into for_next_testing
Reiserfs locking fixes.
Diffstat (limited to 'fs/reiserfs/dir.c')
-rw-r--r-- | fs/reiserfs/dir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 03e4ca5624d6..1fd2051109a3 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c @@ -71,6 +71,7 @@ int reiserfs_readdir_inode(struct inode *inode, struct dir_context *ctx) char small_buf[32]; /* avoid kmalloc if we can */ struct reiserfs_dir_entry de; int ret = 0; + int depth; reiserfs_write_lock(inode->i_sb); @@ -181,17 +182,17 @@ int reiserfs_readdir_inode(struct inode *inode, struct dir_context *ctx) * Since filldir might sleep, we can release * the write lock here for other waiters */ - reiserfs_write_unlock(inode->i_sb); + depth = reiserfs_write_unlock_nested(inode->i_sb); if (!dir_emit (ctx, local_buf, d_reclen, d_ino, DT_UNKNOWN)) { - reiserfs_write_lock(inode->i_sb); + reiserfs_write_lock_nested(inode->i_sb, depth); if (local_buf != small_buf) { kfree(local_buf); } goto end; } - reiserfs_write_lock(inode->i_sb); + reiserfs_write_lock_nested(inode->i_sb, depth); if (local_buf != small_buf) { kfree(local_buf); } |