aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2014-04-23 10:00:37 -0400
committerJan Kara <jack@suse.cz>2014-05-06 17:05:40 -0400
commit706a5323384d9ae973a72005b73987d39e009019 (patch)
tree19d0e910cf9ab5754f2e8eebc60a851ca7ebe660 /fs
parent098297b27d23ad9d0fc302e3417474d9342c6c14 (diff)
reiserfs: cleanup, remove nblocks argument from journal_end
journal_end takes a block count argument but doesn't actually use it for anything. We can remove it. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/file.c4
-rw-r--r--fs/reiserfs/inode.c33
-rw-r--r--fs/reiserfs/journal.c38
-rw-r--r--fs/reiserfs/namei.c38
-rw-r--r--fs/reiserfs/reiserfs.h7
-rw-r--r--fs/reiserfs/resize.c6
-rw-r--r--fs/reiserfs/stree.c3
-rw-r--r--fs/reiserfs/super.c30
-rw-r--r--fs/reiserfs/xattr.c4
-rw-r--r--fs/reiserfs/xattr_acl.c2
10 files changed, 75 insertions, 90 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c
index 27399430664e..653074a2a48c 100644
--- a/fs/reiserfs/file.c
+++ b/fs/reiserfs/file.c
@@ -96,7 +96,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp)
96#ifdef REISERFS_PREALLOCATE 96#ifdef REISERFS_PREALLOCATE
97 reiserfs_discard_prealloc(&th, inode); 97 reiserfs_discard_prealloc(&th, inode);
98#endif 98#endif
99 err = journal_end(&th, inode->i_sb, 1); 99 err = journal_end(&th, inode->i_sb);
100 100
101 /* copy back the error code from journal_begin */ 101 /* copy back the error code from journal_begin */
102 if (!err) 102 if (!err)
@@ -227,7 +227,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page,
227 } 227 }
228 } 228 }
229 if (logit) { 229 if (logit) {
230 ret = journal_end(&th, s, bh_per_page + 1); 230 ret = journal_end(&th, s);
231 drop_write_lock: 231 drop_write_lock:
232 reiserfs_write_unlock(s); 232 reiserfs_write_unlock(s);
233 } 233 }
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index cc2095943ec6..f0a8091c5ace 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -72,7 +72,7 @@ void reiserfs_evict_inode(struct inode *inode)
72 reiserfs_write_lock_nested(inode->i_sb, depth); 72 reiserfs_write_lock_nested(inode->i_sb, depth);
73 } 73 }
74 74
75 if (journal_end(&th, inode->i_sb, jbegin_count)) 75 if (journal_end(&th, inode->i_sb))
76 goto out; 76 goto out;
77 77
78 /* 78 /*
@@ -252,7 +252,6 @@ static int restart_transaction(struct reiserfs_transaction_handle *th,
252 struct inode *inode, struct treepath *path) 252 struct inode *inode, struct treepath *path)
253{ 253{
254 struct super_block *s = th->t_super; 254 struct super_block *s = th->t_super;
255 int len = th->t_blocks_allocated;
256 int err; 255 int err;
257 256
258 BUG_ON(!th->t_trans_id); 257 BUG_ON(!th->t_trans_id);
@@ -265,7 +264,7 @@ static int restart_transaction(struct reiserfs_transaction_handle *th,
265 return 0; 264 return 0;
266 } 265 }
267 reiserfs_update_sd(th, inode); 266 reiserfs_update_sd(th, inode);
268 err = journal_end(th, s, len); 267 err = journal_end(th, s);
269 if (!err) { 268 if (!err) {
270 err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6); 269 err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6);
271 if (!err) 270 if (!err)
@@ -1791,7 +1790,7 @@ int reiserfs_write_inode(struct inode *inode, struct writeback_control *wbc)
1791 reiserfs_write_lock(inode->i_sb); 1790 reiserfs_write_lock(inode->i_sb);
1792 if (!journal_begin(&th, inode->i_sb, jbegin_count)) { 1791 if (!journal_begin(&th, inode->i_sb, jbegin_count)) {
1793 reiserfs_update_sd(&th, inode); 1792 reiserfs_update_sd(&th, inode);
1794 journal_end_sync(&th, inode->i_sb, jbegin_count); 1793 journal_end_sync(&th, inode->i_sb);
1795 } 1794 }
1796 reiserfs_write_unlock(inode->i_sb); 1795 reiserfs_write_unlock(inode->i_sb);
1797 } 1796 }
@@ -2098,7 +2097,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
2098 if (retval) { 2097 if (retval) {
2099 err = retval; 2098 err = retval;
2100 reiserfs_check_path(&path_to_key); 2099 reiserfs_check_path(&path_to_key);
2101 journal_end(th, th->t_super, th->t_blocks_allocated); 2100 journal_end(th, th->t_super);
2102 goto out_inserted_sd; 2101 goto out_inserted_sd;
2103 } 2102 }
2104 2103
@@ -2109,7 +2108,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
2109 if (retval) { 2108 if (retval) {
2110 err = retval; 2109 err = retval;
2111 reiserfs_check_path(&path_to_key); 2110 reiserfs_check_path(&path_to_key);
2112 journal_end(th, th->t_super, th->t_blocks_allocated); 2111 journal_end(th, th->t_super);
2113 goto out_inserted_sd; 2112 goto out_inserted_sd;
2114 } 2113 }
2115 } else if (inode->i_sb->s_flags & MS_POSIXACL) { 2114 } else if (inode->i_sb->s_flags & MS_POSIXACL) {
@@ -2126,8 +2125,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
2126 if (retval) { 2125 if (retval) {
2127 err = retval; 2126 err = retval;
2128 reiserfs_check_path(&path_to_key); 2127 reiserfs_check_path(&path_to_key);
2129 retval = journal_end(th, th->t_super, 2128 retval = journal_end(th, th->t_super);
2130 th->t_blocks_allocated);
2131 if (retval) 2129 if (retval)
2132 err = retval; 2130 err = retval;
2133 goto out_inserted_sd; 2131 goto out_inserted_sd;
@@ -2149,7 +2147,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
2149 reiserfs_write_lock_nested(inode->i_sb, depth); 2147 reiserfs_write_lock_nested(inode->i_sb, depth);
2150 2148
2151 out_end_trans: 2149 out_end_trans:
2152 journal_end(th, th->t_super, th->t_blocks_allocated); 2150 journal_end(th, th->t_super);
2153 /* 2151 /*
2154 * Drop can be outside and it needs more credits so it's better 2152 * Drop can be outside and it needs more credits so it's better
2155 * to have it outside 2153 * to have it outside
@@ -2319,8 +2317,7 @@ int reiserfs_truncate_file(struct inode *inode, int update_timestamps)
2319 */ 2317 */
2320 add_save_link(&th, inode, 1); 2318 add_save_link(&th, inode, 1);
2321 err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps); 2319 err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps);
2322 error = 2320 error = journal_end(&th, inode->i_sb);
2323 journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 + 1);
2324 if (error) 2321 if (error)
2325 goto out; 2322 goto out;
2326 2323
@@ -2483,7 +2480,7 @@ static int map_block_for_writepage(struct inode *inode,
2483 out: 2480 out:
2484 pathrelse(&path); 2481 pathrelse(&path);
2485 if (trans_running) { 2482 if (trans_running) {
2486 int err = journal_end(&th, inode->i_sb, jbegin_count); 2483 int err = journal_end(&th, inode->i_sb);
2487 if (err) 2484 if (err)
2488 retval = err; 2485 retval = err;
2489 trans_running = 0; 2486 trans_running = 0;
@@ -2653,7 +2650,7 @@ static int reiserfs_write_full_page(struct page *page,
2653 } while ((bh = bh->b_this_page) != head); 2650 } while ((bh = bh->b_this_page) != head);
2654 2651
2655 if (checked) { 2652 if (checked) {
2656 error = journal_end(&th, s, bh_per_page + 1); 2653 error = journal_end(&th, s);
2657 reiserfs_write_unlock(s); 2654 reiserfs_write_unlock(s);
2658 if (error) 2655 if (error)
2659 goto fail; 2656 goto fail;
@@ -2956,7 +2953,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
2956 mark_inode_dirty(inode); 2953 mark_inode_dirty(inode);
2957 reiserfs_update_sd(&myth, inode); 2954 reiserfs_update_sd(&myth, inode);
2958 update_sd = 1; 2955 update_sd = 1;
2959 ret = journal_end(&myth, inode->i_sb, 1); 2956 ret = journal_end(&myth, inode->i_sb);
2960 if (ret) 2957 if (ret)
2961 goto journal_error; 2958 goto journal_error;
2962 } 2959 }
@@ -3045,7 +3042,7 @@ int reiserfs_commit_write(struct file *f, struct page *page,
3045 mark_inode_dirty(inode); 3042 mark_inode_dirty(inode);
3046 reiserfs_update_sd(&myth, inode); 3043 reiserfs_update_sd(&myth, inode);
3047 update_sd = 1; 3044 update_sd = 1;
3048 ret = journal_end(&myth, inode->i_sb, 1); 3045 ret = journal_end(&myth, inode->i_sb);
3049 if (ret) 3046 if (ret)
3050 goto journal_error; 3047 goto journal_error;
3051 } 3048 }
@@ -3349,7 +3346,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3349 err = journal_begin(&th, inode->i_sb, 4); 3346 err = journal_begin(&th, inode->i_sb, 4);
3350 if (!err) { 3347 if (!err) {
3351 reiserfs_discard_prealloc(&th, inode); 3348 reiserfs_discard_prealloc(&th, inode);
3352 err = journal_end(&th, inode->i_sb, 4); 3349 err = journal_end(&th, inode->i_sb);
3353 } 3350 }
3354 if (err) 3351 if (err)
3355 error = err; 3352 error = err;
@@ -3401,7 +3398,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3401 error = dquot_transfer(inode, attr); 3398 error = dquot_transfer(inode, attr);
3402 reiserfs_write_lock(inode->i_sb); 3399 reiserfs_write_lock(inode->i_sb);
3403 if (error) { 3400 if (error) {
3404 journal_end(&th, inode->i_sb, jbegin_count); 3401 journal_end(&th, inode->i_sb);
3405 reiserfs_write_unlock(inode->i_sb); 3402 reiserfs_write_unlock(inode->i_sb);
3406 goto out; 3403 goto out;
3407 } 3404 }
@@ -3415,7 +3412,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3415 if (attr->ia_valid & ATTR_GID) 3412 if (attr->ia_valid & ATTR_GID)
3416 inode->i_gid = attr->ia_gid; 3413 inode->i_gid = attr->ia_gid;
3417 mark_inode_dirty(inode); 3414 mark_inode_dirty(inode);
3418 error = journal_end(&th, inode->i_sb, jbegin_count); 3415 error = journal_end(&th, inode->i_sb);
3419 reiserfs_write_unlock(inode->i_sb); 3416 reiserfs_write_unlock(inode->i_sb);
3420 if (error) 3417 if (error)
3421 goto out; 3418 goto out;
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 48f03e5d16ef..a2f80d6c4f7e 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -84,8 +84,7 @@
84#define WAIT 4 /* wait for the log blocks to hit the disk */ 84#define WAIT 4 /* wait for the log blocks to hit the disk */
85 85
86static int do_journal_end(struct reiserfs_transaction_handle *, 86static int do_journal_end(struct reiserfs_transaction_handle *,
87 struct super_block *, unsigned long nblocks, 87 struct super_block *, int flags);
88 int flags);
89static int flush_journal_list(struct super_block *s, 88static int flush_journal_list(struct super_block *s,
90 struct reiserfs_journal_list *jl, int flushall); 89 struct reiserfs_journal_list *jl, int flushall);
91static int flush_commit_list(struct super_block *s, 90static int flush_commit_list(struct super_block *s,
@@ -1921,7 +1920,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
1921 if (!error && !(sb->s_flags & MS_RDONLY)) { 1920 if (!error && !(sb->s_flags & MS_RDONLY)) {
1922 /* end the current trans */ 1921 /* end the current trans */
1923 BUG_ON(!th->t_trans_id); 1922 BUG_ON(!th->t_trans_id);
1924 do_journal_end(th, sb, 10, FLUSH_ALL); 1923 do_journal_end(th, sb, FLUSH_ALL);
1925 1924
1926 /* 1925 /*
1927 * make sure something gets logged to force 1926 * make sure something gets logged to force
@@ -1933,7 +1932,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
1933 1); 1932 1);
1934 journal_mark_dirty(&myth, sb, 1933 journal_mark_dirty(&myth, sb,
1935 SB_BUFFER_WITH_SB(sb)); 1934 SB_BUFFER_WITH_SB(sb));
1936 do_journal_end(&myth, sb, 1, FLUSH_ALL); 1935 do_journal_end(&myth, sb, FLUSH_ALL);
1937 flushed = 1; 1936 flushed = 1;
1938 } 1937 }
1939 } 1938 }
@@ -1947,7 +1946,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
1947 1); 1946 1);
1948 journal_mark_dirty(&myth, sb, 1947 journal_mark_dirty(&myth, sb,
1949 SB_BUFFER_WITH_SB(sb)); 1948 SB_BUFFER_WITH_SB(sb));
1950 do_journal_end(&myth, sb, 1, FLUSH_ALL); 1949 do_journal_end(&myth, sb, FLUSH_ALL);
1951 } 1950 }
1952 } 1951 }
1953 1952
@@ -3102,9 +3101,9 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
3102 3101
3103 /* someone might have ended the transaction while we joined */ 3102 /* someone might have ended the transaction while we joined */
3104 if (old_trans_id != journal->j_trans_id) { 3103 if (old_trans_id != journal->j_trans_id) {
3105 retval = do_journal_end(&myth, sb, 1, 0); 3104 retval = do_journal_end(&myth, sb, 0);
3106 } else { 3105 } else {
3107 retval = do_journal_end(&myth, sb, 1, COMMIT_NOW); 3106 retval = do_journal_end(&myth, sb, COMMIT_NOW);
3108 } 3107 }
3109 3108
3110 if (retval) 3109 if (retval)
@@ -3174,7 +3173,7 @@ int reiserfs_end_persistent_transaction(struct reiserfs_transaction_handle *th)
3174 struct super_block *s = th->t_super; 3173 struct super_block *s = th->t_super;
3175 int ret = 0; 3174 int ret = 0;
3176 if (th->t_trans_id) 3175 if (th->t_trans_id)
3177 ret = journal_end(th, th->t_super, th->t_blocks_allocated); 3176 ret = journal_end(th, th->t_super);
3178 else 3177 else
3179 ret = -EIO; 3178 ret = -EIO;
3180 if (th->t_refcount == 0) { 3179 if (th->t_refcount == 0) {
@@ -3375,8 +3374,7 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th,
3375 return 0; 3374 return 0;
3376} 3375}
3377 3376
3378int journal_end(struct reiserfs_transaction_handle *th, 3377int journal_end(struct reiserfs_transaction_handle *th, struct super_block *sb)
3379 struct super_block *sb, unsigned long nblocks)
3380{ 3378{
3381 if (!current->journal_info && th->t_refcount > 1) 3379 if (!current->journal_info && th->t_refcount > 1)
3382 reiserfs_warning(sb, "REISER-NESTING", 3380 reiserfs_warning(sb, "REISER-NESTING",
@@ -3404,7 +3402,7 @@ int journal_end(struct reiserfs_transaction_handle *th,
3404 } 3402 }
3405 return 0; 3403 return 0;
3406 } else { 3404 } else {
3407 return do_journal_end(th, sb, nblocks, 0); 3405 return do_journal_end(th, sb, 0);
3408 } 3406 }
3409} 3407}
3410 3408
@@ -3514,7 +3512,7 @@ static int can_dirty(struct reiserfs_journal_cnode *cn)
3514 * will wait until the current transaction is done/committed before returning 3512 * will wait until the current transaction is done/committed before returning
3515 */ 3513 */
3516int journal_end_sync(struct reiserfs_transaction_handle *th, 3514int journal_end_sync(struct reiserfs_transaction_handle *th,
3517 struct super_block *sb, unsigned long nblocks) 3515 struct super_block *sb)
3518{ 3516{
3519 struct reiserfs_journal *journal = SB_JOURNAL(sb); 3517 struct reiserfs_journal *journal = SB_JOURNAL(sb);
3520 3518
@@ -3526,7 +3524,7 @@ int journal_end_sync(struct reiserfs_transaction_handle *th,
3526 1); 3524 1);
3527 journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb)); 3525 journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb));
3528 } 3526 }
3529 return do_journal_end(th, sb, nblocks, COMMIT_NOW | WAIT); 3527 return do_journal_end(th, sb, COMMIT_NOW | WAIT);
3530} 3528}
3531 3529
3532/* writeback the pending async commits to disk */ 3530/* writeback the pending async commits to disk */
@@ -3586,7 +3584,7 @@ void reiserfs_flush_old_commits(struct super_block *sb)
3586 * no sense to do an async commit so that kreiserfsd 3584 * no sense to do an async commit so that kreiserfsd
3587 * can do it later 3585 * can do it later
3588 */ 3586 */
3589 do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT); 3587 do_journal_end(&th, sb, COMMIT_NOW | WAIT);
3590 } 3588 }
3591 } 3589 }
3592} 3590}
@@ -3607,8 +3605,7 @@ void reiserfs_flush_old_commits(struct super_block *sb)
3607 * writers in the log. 3605 * writers in the log.
3608 */ 3606 */
3609static int check_journal_end(struct reiserfs_transaction_handle *th, 3607static int check_journal_end(struct reiserfs_transaction_handle *th,
3610 struct super_block *sb, unsigned long nblocks, 3608 struct super_block *sb, int flags)
3611 int flags)
3612{ 3609{
3613 3610
3614 time_t now; 3611 time_t now;
@@ -3867,11 +3864,11 @@ static int __commit_trans_jl(struct inode *inode, unsigned long id,
3867 reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), 3864 reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb),
3868 1); 3865 1);
3869 journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)); 3866 journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb));
3870 ret = journal_end(&th, sb, 1); 3867 ret = journal_end(&th, sb);
3871 goto flush_commit_only; 3868 goto flush_commit_only;
3872 } 3869 }
3873 3870
3874 ret = journal_end_sync(&th, sb, 1); 3871 ret = journal_end_sync(&th, sb);
3875 if (!ret) 3872 if (!ret)
3876 ret = 1; 3873 ret = 1;
3877 3874
@@ -3978,8 +3975,7 @@ int reiserfs_prepare_for_journal(struct super_block *sb,
3978 * journal lists, etc just won't happen. 3975 * journal lists, etc just won't happen.
3979 */ 3976 */
3980static int do_journal_end(struct reiserfs_transaction_handle *th, 3977static int do_journal_end(struct reiserfs_transaction_handle *th,
3981 struct super_block *sb, unsigned long nblocks, 3978 struct super_block *sb, int flags)
3982 int flags)
3983{ 3979{
3984 struct reiserfs_journal *journal = SB_JOURNAL(sb); 3980 struct reiserfs_journal *journal = SB_JOURNAL(sb);
3985 struct reiserfs_journal_cnode *cn, *next, *jl_cn; 3981 struct reiserfs_journal_cnode *cn, *next, *jl_cn;
@@ -4035,7 +4031,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th,
4035 * not return 1 it tells us if we should continue with the 4031 * not return 1 it tells us if we should continue with the
4036 * journal_end, or just return 4032 * journal_end, or just return
4037 */ 4033 */
4038 if (!check_journal_end(th, sb, nblocks, flags)) { 4034 if (!check_journal_end(th, sb, flags)) {
4039 reiserfs_schedule_old_flush(sb); 4035 reiserfs_schedule_old_flush(sb);
4040 wake_queued_writers(sb); 4036 wake_queued_writers(sb);
4041 reiserfs_async_progress_wait(sb); 4037 reiserfs_async_progress_wait(sb);
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 6bc38de8357f..f1b99634dc16 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -672,7 +672,7 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mod
672 int err; 672 int err;
673 drop_nlink(inode); 673 drop_nlink(inode);
674 reiserfs_update_sd(&th, inode); 674 reiserfs_update_sd(&th, inode);
675 err = journal_end(&th, dir->i_sb, jbegin_count); 675 err = journal_end(&th, dir->i_sb);
676 if (err) 676 if (err)
677 retval = err; 677 retval = err;
678 unlock_new_inode(inode); 678 unlock_new_inode(inode);
@@ -684,7 +684,7 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, umode_t mod
684 684
685 unlock_new_inode(inode); 685 unlock_new_inode(inode);
686 d_instantiate(dentry, inode); 686 d_instantiate(dentry, inode);
687 retval = journal_end(&th, dir->i_sb, jbegin_count); 687 retval = journal_end(&th, dir->i_sb);
688 688
689 out_failed: 689 out_failed:
690 reiserfs_write_unlock(dir->i_sb); 690 reiserfs_write_unlock(dir->i_sb);
@@ -755,7 +755,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode
755 int err; 755 int err;
756 drop_nlink(inode); 756 drop_nlink(inode);
757 reiserfs_update_sd(&th, inode); 757 reiserfs_update_sd(&th, inode);
758 err = journal_end(&th, dir->i_sb, jbegin_count); 758 err = journal_end(&th, dir->i_sb);
759 if (err) 759 if (err)
760 retval = err; 760 retval = err;
761 unlock_new_inode(inode); 761 unlock_new_inode(inode);
@@ -765,7 +765,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode
765 765
766 unlock_new_inode(inode); 766 unlock_new_inode(inode);
767 d_instantiate(dentry, inode); 767 d_instantiate(dentry, inode);
768 retval = journal_end(&th, dir->i_sb, jbegin_count); 768 retval = journal_end(&th, dir->i_sb);
769 769
770 out_failed: 770 out_failed:
771 reiserfs_write_unlock(dir->i_sb); 771 reiserfs_write_unlock(dir->i_sb);
@@ -847,7 +847,7 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
847 clear_nlink(inode); 847 clear_nlink(inode);
848 DEC_DIR_INODE_NLINK(dir); 848 DEC_DIR_INODE_NLINK(dir);
849 reiserfs_update_sd(&th, inode); 849 reiserfs_update_sd(&th, inode);
850 err = journal_end(&th, dir->i_sb, jbegin_count); 850 err = journal_end(&th, dir->i_sb);
851 if (err) 851 if (err)
852 retval = err; 852 retval = err;
853 unlock_new_inode(inode); 853 unlock_new_inode(inode);
@@ -859,7 +859,7 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
859 859
860 unlock_new_inode(inode); 860 unlock_new_inode(inode);
861 d_instantiate(dentry, inode); 861 d_instantiate(dentry, inode);
862 retval = journal_end(&th, dir->i_sb, jbegin_count); 862 retval = journal_end(&th, dir->i_sb);
863out_failed: 863out_failed:
864 reiserfs_write_unlock(dir->i_sb); 864 reiserfs_write_unlock(dir->i_sb);
865 return retval; 865 return retval;
@@ -956,7 +956,7 @@ static int reiserfs_rmdir(struct inode *dir, struct dentry *dentry)
956 /* prevent empty directory from getting lost */ 956 /* prevent empty directory from getting lost */
957 add_save_link(&th, inode, 0 /* not truncate */ ); 957 add_save_link(&th, inode, 0 /* not truncate */ );
958 958
959 retval = journal_end(&th, dir->i_sb, jbegin_count); 959 retval = journal_end(&th, dir->i_sb);
960 reiserfs_check_path(&path); 960 reiserfs_check_path(&path);
961 out_rmdir: 961 out_rmdir:
962 reiserfs_write_unlock(dir->i_sb); 962 reiserfs_write_unlock(dir->i_sb);
@@ -969,7 +969,7 @@ static int reiserfs_rmdir(struct inode *dir, struct dentry *dentry)
969 * release path if operation was not complete 969 * release path if operation was not complete
970 */ 970 */
971 pathrelse(&path); 971 pathrelse(&path);
972 err = journal_end(&th, dir->i_sb, jbegin_count); 972 err = journal_end(&th, dir->i_sb);
973 reiserfs_write_unlock(dir->i_sb); 973 reiserfs_write_unlock(dir->i_sb);
974 return err ? err : retval; 974 return err ? err : retval;
975} 975}
@@ -1059,14 +1059,14 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry)
1059 /* prevent file from getting lost */ 1059 /* prevent file from getting lost */
1060 add_save_link(&th, inode, 0 /* not truncate */ ); 1060 add_save_link(&th, inode, 0 /* not truncate */ );
1061 1061
1062 retval = journal_end(&th, dir->i_sb, jbegin_count); 1062 retval = journal_end(&th, dir->i_sb);
1063 reiserfs_check_path(&path); 1063 reiserfs_check_path(&path);
1064 reiserfs_write_unlock(dir->i_sb); 1064 reiserfs_write_unlock(dir->i_sb);
1065 return retval; 1065 return retval;
1066 1066
1067 end_unlink: 1067 end_unlink:
1068 pathrelse(&path); 1068 pathrelse(&path);
1069 err = journal_end(&th, dir->i_sb, jbegin_count); 1069 err = journal_end(&th, dir->i_sb);
1070 reiserfs_check_path(&path); 1070 reiserfs_check_path(&path);
1071 if (err) 1071 if (err)
1072 retval = err; 1072 retval = err;
@@ -1153,7 +1153,7 @@ static int reiserfs_symlink(struct inode *parent_dir,
1153 int err; 1153 int err;
1154 drop_nlink(inode); 1154 drop_nlink(inode);
1155 reiserfs_update_sd(&th, inode); 1155 reiserfs_update_sd(&th, inode);
1156 err = journal_end(&th, parent_dir->i_sb, jbegin_count); 1156 err = journal_end(&th, parent_dir->i_sb);
1157 if (err) 1157 if (err)
1158 retval = err; 1158 retval = err;
1159 unlock_new_inode(inode); 1159 unlock_new_inode(inode);
@@ -1163,7 +1163,7 @@ static int reiserfs_symlink(struct inode *parent_dir,
1163 1163
1164 unlock_new_inode(inode); 1164 unlock_new_inode(inode);
1165 d_instantiate(dentry, inode); 1165 d_instantiate(dentry, inode);
1166 retval = journal_end(&th, parent_dir->i_sb, jbegin_count); 1166 retval = journal_end(&th, parent_dir->i_sb);
1167 out_failed: 1167 out_failed:
1168 reiserfs_write_unlock(parent_dir->i_sb); 1168 reiserfs_write_unlock(parent_dir->i_sb);
1169 return retval; 1169 return retval;
@@ -1213,7 +1213,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir,
1213 if (retval) { 1213 if (retval) {
1214 int err; 1214 int err;
1215 drop_nlink(inode); 1215 drop_nlink(inode);
1216 err = journal_end(&th, dir->i_sb, jbegin_count); 1216 err = journal_end(&th, dir->i_sb);
1217 reiserfs_write_unlock(dir->i_sb); 1217 reiserfs_write_unlock(dir->i_sb);
1218 return err ? err : retval; 1218 return err ? err : retval;
1219 } 1219 }
@@ -1223,7 +1223,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir,
1223 1223
1224 ihold(inode); 1224 ihold(inode);
1225 d_instantiate(dentry, inode); 1225 d_instantiate(dentry, inode);
1226 retval = journal_end(&th, dir->i_sb, jbegin_count); 1226 retval = journal_end(&th, dir->i_sb);
1227 reiserfs_write_unlock(dir->i_sb); 1227 reiserfs_write_unlock(dir->i_sb);
1228 return retval; 1228 return retval;
1229} 1229}
@@ -1385,7 +1385,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1385 "new entry is found, new inode == 0"); 1385 "new entry is found, new inode == 0");
1386 } 1386 }
1387 } else if (retval) { 1387 } else if (retval) {
1388 int err = journal_end(&th, old_dir->i_sb, jbegin_count); 1388 int err = journal_end(&th, old_dir->i_sb);
1389 reiserfs_write_unlock(old_dir->i_sb); 1389 reiserfs_write_unlock(old_dir->i_sb);
1390 return err ? err : retval; 1390 return err ? err : retval;
1391 } 1391 }
@@ -1412,7 +1412,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1412 &old_entry_path, 1412 &old_entry_path,
1413 &old_de)) != NAME_FOUND) { 1413 &old_de)) != NAME_FOUND) {
1414 pathrelse(&old_entry_path); 1414 pathrelse(&old_entry_path);
1415 journal_end(&th, old_dir->i_sb, jbegin_count); 1415 journal_end(&th, old_dir->i_sb);
1416 reiserfs_write_unlock(old_dir->i_sb); 1416 reiserfs_write_unlock(old_dir->i_sb);
1417 return -EIO; 1417 return -EIO;
1418 } 1418 }
@@ -1436,7 +1436,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1436 if (retval != NAME_FOUND_INVISIBLE && retval != NAME_FOUND) { 1436 if (retval != NAME_FOUND_INVISIBLE && retval != NAME_FOUND) {
1437 pathrelse(&new_entry_path); 1437 pathrelse(&new_entry_path);
1438 pathrelse(&old_entry_path); 1438 pathrelse(&old_entry_path);
1439 journal_end(&th, old_dir->i_sb, jbegin_count); 1439 journal_end(&th, old_dir->i_sb);
1440 reiserfs_write_unlock(old_dir->i_sb); 1440 reiserfs_write_unlock(old_dir->i_sb);
1441 return -EIO; 1441 return -EIO;
1442 } 1442 }
@@ -1454,7 +1454,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1454 pathrelse(&dot_dot_entry_path); 1454 pathrelse(&dot_dot_entry_path);
1455 pathrelse(&new_entry_path); 1455 pathrelse(&new_entry_path);
1456 pathrelse(&old_entry_path); 1456 pathrelse(&old_entry_path);
1457 journal_end(&th, old_dir->i_sb, jbegin_count); 1457 journal_end(&th, old_dir->i_sb);
1458 reiserfs_write_unlock(old_dir->i_sb); 1458 reiserfs_write_unlock(old_dir->i_sb);
1459 return -EIO; 1459 return -EIO;
1460 } 1460 }
@@ -1601,7 +1601,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1601 reiserfs_update_sd(&th, new_dentry_inode); 1601 reiserfs_update_sd(&th, new_dentry_inode);
1602 } 1602 }
1603 1603
1604 retval = journal_end(&th, old_dir->i_sb, jbegin_count); 1604 retval = journal_end(&th, old_dir->i_sb);
1605 reiserfs_write_unlock(old_dir->i_sb); 1605 reiserfs_write_unlock(old_dir->i_sb);
1606 return retval; 1606 return retval;
1607} 1607}
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h
index 2195e7f2297f..010f00bbec53 100644
--- a/fs/reiserfs/reiserfs.h
+++ b/fs/reiserfs/reiserfs.h
@@ -2914,10 +2914,9 @@ int journal_init(struct super_block *, const char *j_dev_name, int old_format,
2914int journal_release(struct reiserfs_transaction_handle *, struct super_block *); 2914int journal_release(struct reiserfs_transaction_handle *, struct super_block *);
2915int journal_release_error(struct reiserfs_transaction_handle *, 2915int journal_release_error(struct reiserfs_transaction_handle *,
2916 struct super_block *); 2916 struct super_block *);
2917int journal_end(struct reiserfs_transaction_handle *, struct super_block *, 2917int journal_end(struct reiserfs_transaction_handle *, struct super_block *);
2918 unsigned long); 2918int journal_end_sync(struct reiserfs_transaction_handle *,
2919int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *, 2919 struct super_block *);
2920 unsigned long);
2921int journal_mark_freed(struct reiserfs_transaction_handle *, 2920int journal_mark_freed(struct reiserfs_transaction_handle *,
2922 struct super_block *, b_blocknr_t blocknr); 2921 struct super_block *, b_blocknr_t blocknr);
2923int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); 2922int journal_transaction_should_end(struct reiserfs_transaction_handle *, int);
diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c
index 037b00c40f1f..2e3f003027aa 100644
--- a/fs/reiserfs/resize.c
+++ b/fs/reiserfs/resize.c
@@ -182,7 +182,7 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new)
182 info = SB_AP_BITMAP(s) + bmap_nr - 1; 182 info = SB_AP_BITMAP(s) + bmap_nr - 1;
183 bh = reiserfs_read_bitmap_block(s, bmap_nr - 1); 183 bh = reiserfs_read_bitmap_block(s, bmap_nr - 1);
184 if (!bh) { 184 if (!bh) {
185 int jerr = journal_end(&th, s, 10); 185 int jerr = journal_end(&th, s);
186 if (jerr) 186 if (jerr)
187 return jerr; 187 return jerr;
188 return -EIO; 188 return -EIO;
@@ -200,7 +200,7 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new)
200 info = SB_AP_BITMAP(s) + bmap_nr_new - 1; 200 info = SB_AP_BITMAP(s) + bmap_nr_new - 1;
201 bh = reiserfs_read_bitmap_block(s, bmap_nr_new - 1); 201 bh = reiserfs_read_bitmap_block(s, bmap_nr_new - 1);
202 if (!bh) { 202 if (!bh) {
203 int jerr = journal_end(&th, s, 10); 203 int jerr = journal_end(&th, s);
204 if (jerr) 204 if (jerr)
205 return jerr; 205 return jerr;
206 return -EIO; 206 return -EIO;
@@ -225,5 +225,5 @@ int reiserfs_resize(struct super_block *s, unsigned long block_count_new)
225 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); 225 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
226 226
227 SB_JOURNAL(s)->j_must_wait = 1; 227 SB_JOURNAL(s)->j_must_wait = 1;
228 return journal_end(&th, s, 10); 228 return journal_end(&th, s);
229} 229}
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index aa86757e48f8..5bc9825114ff 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1985,7 +1985,6 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th,
1985 */ 1985 */
1986 if (journal_transaction_should_end(th, 0) || 1986 if (journal_transaction_should_end(th, 0) ||
1987 reiserfs_transaction_free_space(th) <= JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD) { 1987 reiserfs_transaction_free_space(th) <= JOURNAL_FOR_FREE_BLOCK_AND_UPDATE_SD) {
1988 int orig_len_alloc = th->t_blocks_allocated;
1989 pathrelse(&s_search_path); 1988 pathrelse(&s_search_path);
1990 1989
1991 if (update_timestamps) { 1990 if (update_timestamps) {
@@ -1994,7 +1993,7 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th,
1994 } 1993 }
1995 reiserfs_update_sd(th, inode); 1994 reiserfs_update_sd(th, inode);
1996 1995
1997 err = journal_end(th, inode->i_sb, orig_len_alloc); 1996 err = journal_end(th, inode->i_sb);
1998 if (err) 1997 if (err)
1999 goto out; 1998 goto out;
2000 err = journal_begin(th, inode->i_sb, 1999 err = journal_begin(th, inode->i_sb,
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 6268bb8195c5..aa8a97b6e6d8 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -74,7 +74,7 @@ static int reiserfs_sync_fs(struct super_block *s, int wait)
74 dquot_writeback_dquots(s, -1); 74 dquot_writeback_dquots(s, -1);
75 reiserfs_write_lock(s); 75 reiserfs_write_lock(s);
76 if (!journal_begin(&th, s, 1)) 76 if (!journal_begin(&th, s, 1))
77 if (!journal_end_sync(&th, s, 1)) 77 if (!journal_end_sync(&th, s))
78 reiserfs_flush_old_commits(s); 78 reiserfs_flush_old_commits(s);
79 reiserfs_write_unlock(s); 79 reiserfs_write_unlock(s);
80 return 0; 80 return 0;
@@ -138,7 +138,7 @@ static int reiserfs_freeze(struct super_block *s)
138 1); 138 1);
139 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); 139 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
140 reiserfs_block_writes(&th); 140 reiserfs_block_writes(&th);
141 journal_end_sync(&th, s, 1); 141 journal_end_sync(&th, s);
142 } 142 }
143 } 143 }
144 reiserfs_write_unlock(s); 144 reiserfs_write_unlock(s);
@@ -178,7 +178,7 @@ static int remove_save_link_only(struct super_block *s,
178 /* removals are protected by direct items */ 178 /* removals are protected by direct items */
179 reiserfs_release_objectid(&th, le32_to_cpu(key->k_objectid)); 179 reiserfs_release_objectid(&th, le32_to_cpu(key->k_objectid));
180 180
181 return journal_end(&th, s, JOURNAL_PER_BALANCE_CNT); 181 return journal_end(&th, s);
182} 182}
183 183
184#ifdef CONFIG_QUOTA 184#ifdef CONFIG_QUOTA
@@ -506,7 +506,7 @@ int remove_save_link(struct inode *inode, int truncate)
506 } else 506 } else
507 REISERFS_I(inode)->i_flags &= ~i_link_saved_truncate_mask; 507 REISERFS_I(inode)->i_flags &= ~i_link_saved_truncate_mask;
508 508
509 return journal_end(&th, inode->i_sb, JOURNAL_PER_BALANCE_CNT); 509 return journal_end(&th, inode->i_sb);
510} 510}
511 511
512static void reiserfs_kill_sb(struct super_block *s) 512static void reiserfs_kill_sb(struct super_block *s)
@@ -659,7 +659,7 @@ static void reiserfs_dirty_inode(struct inode *inode, int flags)
659 goto out; 659 goto out;
660 660
661 reiserfs_update_sd(&th, inode); 661 reiserfs_update_sd(&th, inode);
662 journal_end(&th, inode->i_sb, 1); 662 journal_end(&th, inode->i_sb);
663 663
664out: 664out:
665 reiserfs_write_unlock(inode->i_sb); 665 reiserfs_write_unlock(inode->i_sb);
@@ -1514,7 +1514,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
1514 } 1514 }
1515 /* this will force a full flush of all journal lists */ 1515 /* this will force a full flush of all journal lists */
1516 SB_JOURNAL(s)->j_must_wait = 1; 1516 SB_JOURNAL(s)->j_must_wait = 1;
1517 err = journal_end(&th, s, 10); 1517 err = journal_end(&th, s);
1518 if (err) 1518 if (err)
1519 goto out_err_unlock; 1519 goto out_err_unlock;
1520 1520
@@ -2107,7 +2107,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
2107 2107
2108 2108
2109 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s)); 2109 journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB(s));
2110 errval = journal_end(&th, s, 1); 2110 errval = journal_end(&th, s);
2111 if (errval) { 2111 if (errval) {
2112 dput(s->s_root); 2112 dput(s->s_root);
2113 s->s_root = NULL; 2113 s->s_root = NULL;
@@ -2220,9 +2220,7 @@ static int reiserfs_write_dquot(struct dquot *dquot)
2220 depth = reiserfs_write_unlock_nested(dquot->dq_sb); 2220 depth = reiserfs_write_unlock_nested(dquot->dq_sb);
2221 ret = dquot_commit(dquot); 2221 ret = dquot_commit(dquot);
2222 reiserfs_write_lock_nested(dquot->dq_sb, depth); 2222 reiserfs_write_lock_nested(dquot->dq_sb, depth);
2223 err = 2223 err = journal_end(&th, dquot->dq_sb);
2224 journal_end(&th, dquot->dq_sb,
2225 REISERFS_QUOTA_TRANS_BLOCKS(dquot->dq_sb));
2226 if (!ret && err) 2224 if (!ret && err)
2227 ret = err; 2225 ret = err;
2228out: 2226out:
@@ -2245,9 +2243,7 @@ static int reiserfs_acquire_dquot(struct dquot *dquot)
2245 depth = reiserfs_write_unlock_nested(dquot->dq_sb); 2243 depth = reiserfs_write_unlock_nested(dquot->dq_sb);
2246 ret = dquot_acquire(dquot); 2244 ret = dquot_acquire(dquot);
2247 reiserfs_write_lock_nested(dquot->dq_sb, depth); 2245 reiserfs_write_lock_nested(dquot->dq_sb, depth);
2248 err = 2246 err = journal_end(&th, dquot->dq_sb);
2249 journal_end(&th, dquot->dq_sb,
2250 REISERFS_QUOTA_INIT_BLOCKS(dquot->dq_sb));
2251 if (!ret && err) 2247 if (!ret && err)
2252 ret = err; 2248 ret = err;
2253out: 2249out:
@@ -2272,9 +2268,7 @@ static int reiserfs_release_dquot(struct dquot *dquot)
2272 } 2268 }
2273 ret = dquot_release(dquot); 2269 ret = dquot_release(dquot);
2274 reiserfs_write_lock(dquot->dq_sb); 2270 reiserfs_write_lock(dquot->dq_sb);
2275 err = 2271 err = journal_end(&th, dquot->dq_sb);
2276 journal_end(&th, dquot->dq_sb,
2277 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb));
2278 if (!ret && err) 2272 if (!ret && err)
2279 ret = err; 2273 ret = err;
2280 reiserfs_write_unlock(dquot->dq_sb); 2274 reiserfs_write_unlock(dquot->dq_sb);
@@ -2307,7 +2301,7 @@ static int reiserfs_write_info(struct super_block *sb, int type)
2307 depth = reiserfs_write_unlock_nested(sb); 2301 depth = reiserfs_write_unlock_nested(sb);
2308 ret = dquot_commit_info(sb, type); 2302 ret = dquot_commit_info(sb, type);
2309 reiserfs_write_lock_nested(sb, depth); 2303 reiserfs_write_lock_nested(sb, depth);
2310 err = journal_end(&th, sb, 2); 2304 err = journal_end(&th, sb);
2311 if (!ret && err) 2305 if (!ret && err)
2312 ret = err; 2306 ret = err;
2313out: 2307out:
@@ -2380,7 +2374,7 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id,
2380 err = journal_begin(&th, sb, 1); 2374 err = journal_begin(&th, sb, 1);
2381 if (err) 2375 if (err)
2382 goto out; 2376 goto out;
2383 err = journal_end_sync(&th, sb, 1); 2377 err = journal_end_sync(&th, sb);
2384 if (err) 2378 if (err)
2385 goto out; 2379 goto out;
2386 } 2380 }
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index f669990376af..b923e6f315e1 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -292,7 +292,7 @@ static int reiserfs_for_each_xattr(struct inode *inode,
292 I_MUTEX_XATTR); 292 I_MUTEX_XATTR);
293 err = action(dir, data); 293 err = action(dir, data);
294 reiserfs_write_lock(inode->i_sb); 294 reiserfs_write_lock(inode->i_sb);
295 jerror = journal_end(&th, inode->i_sb, blocks); 295 jerror = journal_end(&th, inode->i_sb);
296 reiserfs_write_unlock(inode->i_sb); 296 reiserfs_write_unlock(inode->i_sb);
297 mutex_unlock(&dir->d_parent->d_inode->i_mutex); 297 mutex_unlock(&dir->d_parent->d_inode->i_mutex);
298 err = jerror ?: err; 298 err = jerror ?: err;
@@ -601,7 +601,7 @@ int reiserfs_xattr_set(struct inode *inode, const char *name,
601 buffer, buffer_size, flags); 601 buffer, buffer_size, flags);
602 602
603 reiserfs_write_lock(inode->i_sb); 603 reiserfs_write_lock(inode->i_sb);
604 error2 = journal_end(&th, inode->i_sb, jbegin_count); 604 error2 = journal_end(&th, inode->i_sb);
605 reiserfs_write_unlock(inode->i_sb); 605 reiserfs_write_unlock(inode->i_sb);
606 if (error == 0) 606 if (error == 0)
607 error = error2; 607 error = error2;
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index a333a073bea8..b51ab6ee7ba9 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -39,7 +39,7 @@ reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
39 if (error == 0) { 39 if (error == 0) {
40 error = __reiserfs_set_acl(&th, inode, type, acl); 40 error = __reiserfs_set_acl(&th, inode, type, acl);
41 reiserfs_write_lock(inode->i_sb); 41 reiserfs_write_lock(inode->i_sb);
42 error2 = journal_end(&th, inode->i_sb, jcreate_blocks); 42 error2 = journal_end(&th, inode->i_sb);
43 reiserfs_write_unlock(inode->i_sb); 43 reiserfs_write_unlock(inode->i_sb);
44 if (error2) 44 if (error2)
45 error = error2; 45 error = error2;