aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/inode.c
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/reiserfs/inode.c
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/reiserfs/inode.c')
-rw-r--r--fs/reiserfs/inode.c33
1 files changed, 15 insertions, 18 deletions
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;