diff options
| -rw-r--r-- | fs/reiserfs/namei.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index e296ff72a6cc..9d4dcf0b07cb 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
| @@ -921,6 +921,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 921 | struct reiserfs_transaction_handle th; | 921 | struct reiserfs_transaction_handle th; |
| 922 | int jbegin_count; | 922 | int jbegin_count; |
| 923 | unsigned long savelink; | 923 | unsigned long savelink; |
| 924 | int depth; | ||
| 924 | 925 | ||
| 925 | inode = dentry->d_inode; | 926 | inode = dentry->d_inode; |
| 926 | 927 | ||
| @@ -932,7 +933,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 932 | JOURNAL_PER_BALANCE_CNT * 2 + 2 + | 933 | JOURNAL_PER_BALANCE_CNT * 2 + 2 + |
| 933 | 4 * REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb); | 934 | 4 * REISERFS_QUOTA_TRANS_BLOCKS(dir->i_sb); |
| 934 | 935 | ||
| 935 | reiserfs_write_lock(dir->i_sb); | 936 | depth = reiserfs_write_lock_once(dir->i_sb); |
| 936 | retval = journal_begin(&th, dir->i_sb, jbegin_count); | 937 | retval = journal_begin(&th, dir->i_sb, jbegin_count); |
| 937 | if (retval) | 938 | if (retval) |
| 938 | goto out_unlink; | 939 | goto out_unlink; |
| @@ -993,7 +994,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 993 | 994 | ||
| 994 | retval = journal_end(&th, dir->i_sb, jbegin_count); | 995 | retval = journal_end(&th, dir->i_sb, jbegin_count); |
| 995 | reiserfs_check_path(&path); | 996 | reiserfs_check_path(&path); |
| 996 | reiserfs_write_unlock(dir->i_sb); | 997 | reiserfs_write_unlock_once(dir->i_sb, depth); |
| 997 | return retval; | 998 | return retval; |
| 998 | 999 | ||
| 999 | end_unlink: | 1000 | end_unlink: |
| @@ -1003,7 +1004,7 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry) | |||
| 1003 | if (err) | 1004 | if (err) |
| 1004 | retval = err; | 1005 | retval = err; |
| 1005 | out_unlink: | 1006 | out_unlink: |
| 1006 | reiserfs_write_unlock(dir->i_sb); | 1007 | reiserfs_write_unlock_once(dir->i_sb, depth); |
| 1007 | return retval; | 1008 | return retval; |
| 1008 | } | 1009 | } |
| 1009 | 1010 | ||
