diff options
author | Jeff Mahoney <jeffm@suse.com> | 2014-04-23 10:00:38 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-05-06 17:08:00 -0400 |
commit | 58d854265c4c7d9792ecb5aa5ef67ba79b1a4c12 (patch) | |
tree | 413b08fdf616386f153a3f6681c6336490cb10e5 | |
parent | 706a5323384d9ae973a72005b73987d39e009019 (diff) |
reiserfs: cleanup, remove sb argument from journal_end
journal_end doesn't need a separate sb argument; it's provided by the
transaction handle.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/reiserfs/file.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 30 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 43 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 38 | ||||
-rw-r--r-- | fs/reiserfs/reiserfs.h | 5 | ||||
-rw-r--r-- | fs/reiserfs/resize.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/stree.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 24 | ||||
-rw-r--r-- | fs/reiserfs/xattr.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 2 |
10 files changed, 79 insertions, 79 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 653074a2a48c..a059320d7b44 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); | 99 | err = journal_end(&th); |
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); | 230 | ret = journal_end(&th); |
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 f0a8091c5ace..5cc5583f252a 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)) | 75 | if (journal_end(&th)) |
76 | goto out; | 76 | goto out; |
77 | 77 | ||
78 | /* | 78 | /* |
@@ -264,7 +264,7 @@ static int restart_transaction(struct reiserfs_transaction_handle *th, | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | reiserfs_update_sd(th, inode); | 266 | reiserfs_update_sd(th, inode); |
267 | err = journal_end(th, s); | 267 | err = journal_end(th); |
268 | if (!err) { | 268 | if (!err) { |
269 | err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6); | 269 | err = journal_begin(th, s, JOURNAL_PER_BALANCE_CNT * 6); |
270 | if (!err) | 270 | if (!err) |
@@ -1790,7 +1790,7 @@ int reiserfs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
1790 | reiserfs_write_lock(inode->i_sb); | 1790 | reiserfs_write_lock(inode->i_sb); |
1791 | if (!journal_begin(&th, inode->i_sb, jbegin_count)) { | 1791 | if (!journal_begin(&th, inode->i_sb, jbegin_count)) { |
1792 | reiserfs_update_sd(&th, inode); | 1792 | reiserfs_update_sd(&th, inode); |
1793 | journal_end_sync(&th, inode->i_sb); | 1793 | journal_end_sync(&th); |
1794 | } | 1794 | } |
1795 | reiserfs_write_unlock(inode->i_sb); | 1795 | reiserfs_write_unlock(inode->i_sb); |
1796 | } | 1796 | } |
@@ -2097,7 +2097,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
2097 | if (retval) { | 2097 | if (retval) { |
2098 | err = retval; | 2098 | err = retval; |
2099 | reiserfs_check_path(&path_to_key); | 2099 | reiserfs_check_path(&path_to_key); |
2100 | journal_end(th, th->t_super); | 2100 | journal_end(th); |
2101 | goto out_inserted_sd; | 2101 | goto out_inserted_sd; |
2102 | } | 2102 | } |
2103 | 2103 | ||
@@ -2108,7 +2108,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
2108 | if (retval) { | 2108 | if (retval) { |
2109 | err = retval; | 2109 | err = retval; |
2110 | reiserfs_check_path(&path_to_key); | 2110 | reiserfs_check_path(&path_to_key); |
2111 | journal_end(th, th->t_super); | 2111 | journal_end(th); |
2112 | goto out_inserted_sd; | 2112 | goto out_inserted_sd; |
2113 | } | 2113 | } |
2114 | } else if (inode->i_sb->s_flags & MS_POSIXACL) { | 2114 | } else if (inode->i_sb->s_flags & MS_POSIXACL) { |
@@ -2125,7 +2125,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
2125 | if (retval) { | 2125 | if (retval) { |
2126 | err = retval; | 2126 | err = retval; |
2127 | reiserfs_check_path(&path_to_key); | 2127 | reiserfs_check_path(&path_to_key); |
2128 | retval = journal_end(th, th->t_super); | 2128 | retval = journal_end(th); |
2129 | if (retval) | 2129 | if (retval) |
2130 | err = retval; | 2130 | err = retval; |
2131 | goto out_inserted_sd; | 2131 | goto out_inserted_sd; |
@@ -2147,7 +2147,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th, | |||
2147 | reiserfs_write_lock_nested(inode->i_sb, depth); | 2147 | reiserfs_write_lock_nested(inode->i_sb, depth); |
2148 | 2148 | ||
2149 | out_end_trans: | 2149 | out_end_trans: |
2150 | journal_end(th, th->t_super); | 2150 | journal_end(th); |
2151 | /* | 2151 | /* |
2152 | * 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 |
2153 | * to have it outside | 2153 | * to have it outside |
@@ -2317,7 +2317,7 @@ int reiserfs_truncate_file(struct inode *inode, int update_timestamps) | |||
2317 | */ | 2317 | */ |
2318 | add_save_link(&th, inode, 1); | 2318 | add_save_link(&th, inode, 1); |
2319 | err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps); | 2319 | err2 = reiserfs_do_truncate(&th, inode, page, update_timestamps); |
2320 | error = journal_end(&th, inode->i_sb); | 2320 | error = journal_end(&th); |
2321 | if (error) | 2321 | if (error) |
2322 | goto out; | 2322 | goto out; |
2323 | 2323 | ||
@@ -2480,7 +2480,7 @@ static int map_block_for_writepage(struct inode *inode, | |||
2480 | out: | 2480 | out: |
2481 | pathrelse(&path); | 2481 | pathrelse(&path); |
2482 | if (trans_running) { | 2482 | if (trans_running) { |
2483 | int err = journal_end(&th, inode->i_sb); | 2483 | int err = journal_end(&th); |
2484 | if (err) | 2484 | if (err) |
2485 | retval = err; | 2485 | retval = err; |
2486 | trans_running = 0; | 2486 | trans_running = 0; |
@@ -2650,7 +2650,7 @@ static int reiserfs_write_full_page(struct page *page, | |||
2650 | } while ((bh = bh->b_this_page) != head); | 2650 | } while ((bh = bh->b_this_page) != head); |
2651 | 2651 | ||
2652 | if (checked) { | 2652 | if (checked) { |
2653 | error = journal_end(&th, s); | 2653 | error = journal_end(&th); |
2654 | reiserfs_write_unlock(s); | 2654 | reiserfs_write_unlock(s); |
2655 | if (error) | 2655 | if (error) |
2656 | goto fail; | 2656 | goto fail; |
@@ -2953,7 +2953,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping, | |||
2953 | mark_inode_dirty(inode); | 2953 | mark_inode_dirty(inode); |
2954 | reiserfs_update_sd(&myth, inode); | 2954 | reiserfs_update_sd(&myth, inode); |
2955 | update_sd = 1; | 2955 | update_sd = 1; |
2956 | ret = journal_end(&myth, inode->i_sb); | 2956 | ret = journal_end(&myth); |
2957 | if (ret) | 2957 | if (ret) |
2958 | goto journal_error; | 2958 | goto journal_error; |
2959 | } | 2959 | } |
@@ -3042,7 +3042,7 @@ int reiserfs_commit_write(struct file *f, struct page *page, | |||
3042 | mark_inode_dirty(inode); | 3042 | mark_inode_dirty(inode); |
3043 | reiserfs_update_sd(&myth, inode); | 3043 | reiserfs_update_sd(&myth, inode); |
3044 | update_sd = 1; | 3044 | update_sd = 1; |
3045 | ret = journal_end(&myth, inode->i_sb); | 3045 | ret = journal_end(&myth); |
3046 | if (ret) | 3046 | if (ret) |
3047 | goto journal_error; | 3047 | goto journal_error; |
3048 | } | 3048 | } |
@@ -3346,7 +3346,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
3346 | err = journal_begin(&th, inode->i_sb, 4); | 3346 | err = journal_begin(&th, inode->i_sb, 4); |
3347 | if (!err) { | 3347 | if (!err) { |
3348 | reiserfs_discard_prealloc(&th, inode); | 3348 | reiserfs_discard_prealloc(&th, inode); |
3349 | err = journal_end(&th, inode->i_sb); | 3349 | err = journal_end(&th); |
3350 | } | 3350 | } |
3351 | if (err) | 3351 | if (err) |
3352 | error = err; | 3352 | error = err; |
@@ -3398,7 +3398,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
3398 | error = dquot_transfer(inode, attr); | 3398 | error = dquot_transfer(inode, attr); |
3399 | reiserfs_write_lock(inode->i_sb); | 3399 | reiserfs_write_lock(inode->i_sb); |
3400 | if (error) { | 3400 | if (error) { |
3401 | journal_end(&th, inode->i_sb); | 3401 | journal_end(&th); |
3402 | reiserfs_write_unlock(inode->i_sb); | 3402 | reiserfs_write_unlock(inode->i_sb); |
3403 | goto out; | 3403 | goto out; |
3404 | } | 3404 | } |
@@ -3412,7 +3412,7 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
3412 | if (attr->ia_valid & ATTR_GID) | 3412 | if (attr->ia_valid & ATTR_GID) |
3413 | inode->i_gid = attr->ia_gid; | 3413 | inode->i_gid = attr->ia_gid; |
3414 | mark_inode_dirty(inode); | 3414 | mark_inode_dirty(inode); |
3415 | error = journal_end(&th, inode->i_sb); | 3415 | error = journal_end(&th); |
3416 | reiserfs_write_unlock(inode->i_sb); | 3416 | reiserfs_write_unlock(inode->i_sb); |
3417 | if (error) | 3417 | if (error) |
3418 | goto out; | 3418 | goto out; |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index a2f80d6c4f7e..5b4ccd5f642e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -83,8 +83,7 @@ | |||
83 | #define COMMIT_NOW 2 /* end and commit this transaction */ | 83 | #define COMMIT_NOW 2 /* end and commit this transaction */ |
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 | ||
86 | static int do_journal_end(struct reiserfs_transaction_handle *, | 86 | static int do_journal_end(struct reiserfs_transaction_handle *, int flags); |
87 | struct super_block *, int flags); | ||
88 | static int flush_journal_list(struct super_block *s, | 87 | static int flush_journal_list(struct super_block *s, |
89 | struct reiserfs_journal_list *jl, int flushall); | 88 | struct reiserfs_journal_list *jl, int flushall); |
90 | static int flush_commit_list(struct super_block *s, | 89 | static int flush_commit_list(struct super_block *s, |
@@ -1920,7 +1919,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1920 | if (!error && !(sb->s_flags & MS_RDONLY)) { | 1919 | if (!error && !(sb->s_flags & MS_RDONLY)) { |
1921 | /* end the current trans */ | 1920 | /* end the current trans */ |
1922 | BUG_ON(!th->t_trans_id); | 1921 | BUG_ON(!th->t_trans_id); |
1923 | do_journal_end(th, sb, FLUSH_ALL); | 1922 | do_journal_end(th, FLUSH_ALL); |
1924 | 1923 | ||
1925 | /* | 1924 | /* |
1926 | * make sure something gets logged to force | 1925 | * make sure something gets logged to force |
@@ -1932,7 +1931,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1932 | 1); | 1931 | 1); |
1933 | journal_mark_dirty(&myth, sb, | 1932 | journal_mark_dirty(&myth, sb, |
1934 | SB_BUFFER_WITH_SB(sb)); | 1933 | SB_BUFFER_WITH_SB(sb)); |
1935 | do_journal_end(&myth, sb, FLUSH_ALL); | 1934 | do_journal_end(&myth, FLUSH_ALL); |
1936 | flushed = 1; | 1935 | flushed = 1; |
1937 | } | 1936 | } |
1938 | } | 1937 | } |
@@ -1946,7 +1945,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1946 | 1); | 1945 | 1); |
1947 | journal_mark_dirty(&myth, sb, | 1946 | journal_mark_dirty(&myth, sb, |
1948 | SB_BUFFER_WITH_SB(sb)); | 1947 | SB_BUFFER_WITH_SB(sb)); |
1949 | do_journal_end(&myth, sb, FLUSH_ALL); | 1948 | do_journal_end(&myth, FLUSH_ALL); |
1950 | } | 1949 | } |
1951 | } | 1950 | } |
1952 | 1951 | ||
@@ -3101,9 +3100,9 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th, | |||
3101 | 3100 | ||
3102 | /* someone might have ended the transaction while we joined */ | 3101 | /* someone might have ended the transaction while we joined */ |
3103 | if (old_trans_id != journal->j_trans_id) { | 3102 | if (old_trans_id != journal->j_trans_id) { |
3104 | retval = do_journal_end(&myth, sb, 0); | 3103 | retval = do_journal_end(&myth, 0); |
3105 | } else { | 3104 | } else { |
3106 | retval = do_journal_end(&myth, sb, COMMIT_NOW); | 3105 | retval = do_journal_end(&myth, COMMIT_NOW); |
3107 | } | 3106 | } |
3108 | 3107 | ||
3109 | if (retval) | 3108 | if (retval) |
@@ -3173,7 +3172,7 @@ int reiserfs_end_persistent_transaction(struct reiserfs_transaction_handle *th) | |||
3173 | struct super_block *s = th->t_super; | 3172 | struct super_block *s = th->t_super; |
3174 | int ret = 0; | 3173 | int ret = 0; |
3175 | if (th->t_trans_id) | 3174 | if (th->t_trans_id) |
3176 | ret = journal_end(th, th->t_super); | 3175 | ret = journal_end(th); |
3177 | else | 3176 | else |
3178 | ret = -EIO; | 3177 | ret = -EIO; |
3179 | if (th->t_refcount == 0) { | 3178 | if (th->t_refcount == 0) { |
@@ -3374,8 +3373,9 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, | |||
3374 | return 0; | 3373 | return 0; |
3375 | } | 3374 | } |
3376 | 3375 | ||
3377 | int journal_end(struct reiserfs_transaction_handle *th, struct super_block *sb) | 3376 | int journal_end(struct reiserfs_transaction_handle *th) |
3378 | { | 3377 | { |
3378 | struct super_block *sb = th->t_super; | ||
3379 | if (!current->journal_info && th->t_refcount > 1) | 3379 | if (!current->journal_info && th->t_refcount > 1) |
3380 | reiserfs_warning(sb, "REISER-NESTING", | 3380 | reiserfs_warning(sb, "REISER-NESTING", |
3381 | "th NULL, refcount %d", th->t_refcount); | 3381 | "th NULL, refcount %d", th->t_refcount); |
@@ -3402,7 +3402,7 @@ int journal_end(struct reiserfs_transaction_handle *th, struct super_block *sb) | |||
3402 | } | 3402 | } |
3403 | return 0; | 3403 | return 0; |
3404 | } else { | 3404 | } else { |
3405 | return do_journal_end(th, sb, 0); | 3405 | return do_journal_end(th, 0); |
3406 | } | 3406 | } |
3407 | } | 3407 | } |
3408 | 3408 | ||
@@ -3511,9 +3511,9 @@ static int can_dirty(struct reiserfs_journal_cnode *cn) | |||
3511 | * syncs the commit blocks, but does not force the real buffers to disk | 3511 | * syncs the commit blocks, but does not force the real buffers to disk |
3512 | * will wait until the current transaction is done/committed before returning | 3512 | * will wait until the current transaction is done/committed before returning |
3513 | */ | 3513 | */ |
3514 | int journal_end_sync(struct reiserfs_transaction_handle *th, | 3514 | int journal_end_sync(struct reiserfs_transaction_handle *th) |
3515 | struct super_block *sb) | ||
3516 | { | 3515 | { |
3516 | struct super_block *sb = th->t_super; | ||
3517 | struct reiserfs_journal *journal = SB_JOURNAL(sb); | 3517 | struct reiserfs_journal *journal = SB_JOURNAL(sb); |
3518 | 3518 | ||
3519 | BUG_ON(!th->t_trans_id); | 3519 | BUG_ON(!th->t_trans_id); |
@@ -3524,7 +3524,7 @@ int journal_end_sync(struct reiserfs_transaction_handle *th, | |||
3524 | 1); | 3524 | 1); |
3525 | journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb)); | 3525 | journal_mark_dirty(th, sb, SB_BUFFER_WITH_SB(sb)); |
3526 | } | 3526 | } |
3527 | return do_journal_end(th, sb, COMMIT_NOW | WAIT); | 3527 | return do_journal_end(th, COMMIT_NOW | WAIT); |
3528 | } | 3528 | } |
3529 | 3529 | ||
3530 | /* writeback the pending async commits to disk */ | 3530 | /* writeback the pending async commits to disk */ |
@@ -3584,7 +3584,7 @@ void reiserfs_flush_old_commits(struct super_block *sb) | |||
3584 | * no sense to do an async commit so that kreiserfsd | 3584 | * no sense to do an async commit so that kreiserfsd |
3585 | * can do it later | 3585 | * can do it later |
3586 | */ | 3586 | */ |
3587 | do_journal_end(&th, sb, COMMIT_NOW | WAIT); | 3587 | do_journal_end(&th, COMMIT_NOW | WAIT); |
3588 | } | 3588 | } |
3589 | } | 3589 | } |
3590 | } | 3590 | } |
@@ -3604,8 +3604,7 @@ void reiserfs_flush_old_commits(struct super_block *sb) | |||
3604 | * Note, we can't allow the journal_end to proceed while there are still | 3604 | * Note, we can't allow the journal_end to proceed while there are still |
3605 | * writers in the log. | 3605 | * writers in the log. |
3606 | */ | 3606 | */ |
3607 | static int check_journal_end(struct reiserfs_transaction_handle *th, | 3607 | static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) |
3608 | struct super_block *sb, int flags) | ||
3609 | { | 3608 | { |
3610 | 3609 | ||
3611 | time_t now; | 3610 | time_t now; |
@@ -3613,6 +3612,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, | |||
3613 | int commit_now = flags & COMMIT_NOW; | 3612 | int commit_now = flags & COMMIT_NOW; |
3614 | int wait_on_commit = flags & WAIT; | 3613 | int wait_on_commit = flags & WAIT; |
3615 | struct reiserfs_journal_list *jl; | 3614 | struct reiserfs_journal_list *jl; |
3615 | struct super_block *sb = th->t_super; | ||
3616 | struct reiserfs_journal *journal = SB_JOURNAL(sb); | 3616 | struct reiserfs_journal *journal = SB_JOURNAL(sb); |
3617 | 3617 | ||
3618 | BUG_ON(!th->t_trans_id); | 3618 | BUG_ON(!th->t_trans_id); |
@@ -3864,11 +3864,11 @@ static int __commit_trans_jl(struct inode *inode, unsigned long id, | |||
3864 | reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), | 3864 | reiserfs_prepare_for_journal(sb, SB_BUFFER_WITH_SB(sb), |
3865 | 1); | 3865 | 1); |
3866 | journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)); | 3866 | journal_mark_dirty(&th, sb, SB_BUFFER_WITH_SB(sb)); |
3867 | ret = journal_end(&th, sb); | 3867 | ret = journal_end(&th); |
3868 | goto flush_commit_only; | 3868 | goto flush_commit_only; |
3869 | } | 3869 | } |
3870 | 3870 | ||
3871 | ret = journal_end_sync(&th, sb); | 3871 | ret = journal_end_sync(&th); |
3872 | if (!ret) | 3872 | if (!ret) |
3873 | ret = 1; | 3873 | ret = 1; |
3874 | 3874 | ||
@@ -3974,9 +3974,9 @@ int reiserfs_prepare_for_journal(struct super_block *sb, | |||
3974 | * If the journal is aborted, we just clean up. Things like flushing | 3974 | * If the journal is aborted, we just clean up. Things like flushing |
3975 | * journal lists, etc just won't happen. | 3975 | * journal lists, etc just won't happen. |
3976 | */ | 3976 | */ |
3977 | static int do_journal_end(struct reiserfs_transaction_handle *th, | 3977 | static int do_journal_end(struct reiserfs_transaction_handle *th, int flags) |
3978 | struct super_block *sb, int flags) | ||
3979 | { | 3978 | { |
3979 | struct super_block *sb = th->t_super; | ||
3980 | struct reiserfs_journal *journal = SB_JOURNAL(sb); | 3980 | struct reiserfs_journal *journal = SB_JOURNAL(sb); |
3981 | struct reiserfs_journal_cnode *cn, *next, *jl_cn; | 3981 | struct reiserfs_journal_cnode *cn, *next, *jl_cn; |
3982 | struct reiserfs_journal_cnode *last_cn = NULL; | 3982 | struct reiserfs_journal_cnode *last_cn = NULL; |
@@ -3998,6 +3998,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, | |||
3998 | 3998 | ||
3999 | BUG_ON(th->t_refcount > 1); | 3999 | BUG_ON(th->t_refcount > 1); |
4000 | BUG_ON(!th->t_trans_id); | 4000 | BUG_ON(!th->t_trans_id); |
4001 | BUG_ON(!th->t_super); | ||
4001 | 4002 | ||
4002 | /* | 4003 | /* |
4003 | * protect flush_older_commits from doing mistakes if the | 4004 | * protect flush_older_commits from doing mistakes if the |
@@ -4031,7 +4032,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, | |||
4031 | * not return 1 it tells us if we should continue with the | 4032 | * not return 1 it tells us if we should continue with the |
4032 | * journal_end, or just return | 4033 | * journal_end, or just return |
4033 | */ | 4034 | */ |
4034 | if (!check_journal_end(th, sb, flags)) { | 4035 | if (!check_journal_end(th, flags)) { |
4035 | reiserfs_schedule_old_flush(sb); | 4036 | reiserfs_schedule_old_flush(sb); |
4036 | wake_queued_writers(sb); | 4037 | wake_queued_writers(sb); |
4037 | reiserfs_async_progress_wait(sb); | 4038 | reiserfs_async_progress_wait(sb); |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index f1b99634dc16..df321eb54496 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); | 675 | err = journal_end(&th); |
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); | 687 | retval = journal_end(&th); |
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); | 758 | err = journal_end(&th); |
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); | 768 | retval = journal_end(&th); |
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); | 850 | err = journal_end(&th); |
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); | 862 | retval = journal_end(&th); |
863 | out_failed: | 863 | out_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); | 959 | retval = journal_end(&th); |
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); | 972 | err = journal_end(&th); |
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); | 1062 | retval = journal_end(&th); |
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); | 1069 | err = journal_end(&th); |
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); | 1156 | err = journal_end(&th); |
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); | 1166 | retval = journal_end(&th); |
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); | 1216 | err = journal_end(&th); |
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); | 1226 | retval = journal_end(&th); |
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); | 1388 | int err = journal_end(&th); |
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); | 1415 | journal_end(&th); |
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); | 1439 | journal_end(&th); |
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); | 1457 | journal_end(&th); |
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); | 1604 | retval = journal_end(&th); |
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 010f00bbec53..7755fe580d0d 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h | |||
@@ -2914,9 +2914,8 @@ int journal_init(struct super_block *, const char *j_dev_name, int old_format, | |||
2914 | int journal_release(struct reiserfs_transaction_handle *, struct super_block *); | 2914 | int journal_release(struct reiserfs_transaction_handle *, struct super_block *); |
2915 | int journal_release_error(struct reiserfs_transaction_handle *, | 2915 | int journal_release_error(struct reiserfs_transaction_handle *, |
2916 | struct super_block *); | 2916 | struct super_block *); |
2917 | int journal_end(struct reiserfs_transaction_handle *, struct super_block *); | 2917 | int journal_end(struct reiserfs_transaction_handle *); |
2918 | int journal_end_sync(struct reiserfs_transaction_handle *, | 2918 | int journal_end_sync(struct reiserfs_transaction_handle *); |
2919 | struct super_block *); | ||
2920 | int journal_mark_freed(struct reiserfs_transaction_handle *, | 2919 | int journal_mark_freed(struct reiserfs_transaction_handle *, |
2921 | struct super_block *, b_blocknr_t blocknr); | 2920 | struct super_block *, b_blocknr_t blocknr); |
2922 | int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); | 2921 | int journal_transaction_should_end(struct reiserfs_transaction_handle *, int); |
diff --git a/fs/reiserfs/resize.c b/fs/reiserfs/resize.c index 2e3f003027aa..99eb32596c6e 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); | 185 | int jerr = journal_end(&th); |
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); | 203 | int jerr = journal_end(&th); |
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); | 228 | return journal_end(&th); |
229 | } | 229 | } |
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index 5bc9825114ff..28c593a75c7a 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c | |||
@@ -1993,7 +1993,7 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th, | |||
1993 | } | 1993 | } |
1994 | reiserfs_update_sd(th, inode); | 1994 | reiserfs_update_sd(th, inode); |
1995 | 1995 | ||
1996 | err = journal_end(th, inode->i_sb); | 1996 | err = journal_end(th); |
1997 | if (err) | 1997 | if (err) |
1998 | goto out; | 1998 | goto out; |
1999 | 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 aa8a97b6e6d8..4d13cfff24e0 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)) | 77 | if (!journal_end_sync(&th)) |
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); | 141 | journal_end_sync(&th); |
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); | 181 | return journal_end(&th); |
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); | 509 | return journal_end(&th); |
510 | } | 510 | } |
511 | 511 | ||
512 | static void reiserfs_kill_sb(struct super_block *s) | 512 | static 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); | 662 | journal_end(&th); |
663 | 663 | ||
664 | out: | 664 | out: |
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); | 1517 | err = journal_end(&th); |
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); | 2110 | errval = journal_end(&th); |
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,7 +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 = journal_end(&th, dquot->dq_sb); | 2223 | err = journal_end(&th); |
2224 | if (!ret && err) | 2224 | if (!ret && err) |
2225 | ret = err; | 2225 | ret = err; |
2226 | out: | 2226 | out: |
@@ -2243,7 +2243,7 @@ static int reiserfs_acquire_dquot(struct dquot *dquot) | |||
2243 | depth = reiserfs_write_unlock_nested(dquot->dq_sb); | 2243 | depth = reiserfs_write_unlock_nested(dquot->dq_sb); |
2244 | ret = dquot_acquire(dquot); | 2244 | ret = dquot_acquire(dquot); |
2245 | reiserfs_write_lock_nested(dquot->dq_sb, depth); | 2245 | reiserfs_write_lock_nested(dquot->dq_sb, depth); |
2246 | err = journal_end(&th, dquot->dq_sb); | 2246 | err = journal_end(&th); |
2247 | if (!ret && err) | 2247 | if (!ret && err) |
2248 | ret = err; | 2248 | ret = err; |
2249 | out: | 2249 | out: |
@@ -2268,7 +2268,7 @@ static int reiserfs_release_dquot(struct dquot *dquot) | |||
2268 | } | 2268 | } |
2269 | ret = dquot_release(dquot); | 2269 | ret = dquot_release(dquot); |
2270 | reiserfs_write_lock(dquot->dq_sb); | 2270 | reiserfs_write_lock(dquot->dq_sb); |
2271 | err = journal_end(&th, dquot->dq_sb); | 2271 | err = journal_end(&th); |
2272 | if (!ret && err) | 2272 | if (!ret && err) |
2273 | ret = err; | 2273 | ret = err; |
2274 | reiserfs_write_unlock(dquot->dq_sb); | 2274 | reiserfs_write_unlock(dquot->dq_sb); |
@@ -2301,7 +2301,7 @@ static int reiserfs_write_info(struct super_block *sb, int type) | |||
2301 | depth = reiserfs_write_unlock_nested(sb); | 2301 | depth = reiserfs_write_unlock_nested(sb); |
2302 | ret = dquot_commit_info(sb, type); | 2302 | ret = dquot_commit_info(sb, type); |
2303 | reiserfs_write_lock_nested(sb, depth); | 2303 | reiserfs_write_lock_nested(sb, depth); |
2304 | err = journal_end(&th, sb); | 2304 | err = journal_end(&th); |
2305 | if (!ret && err) | 2305 | if (!ret && err) |
2306 | ret = err; | 2306 | ret = err; |
2307 | out: | 2307 | out: |
@@ -2374,7 +2374,7 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2374 | err = journal_begin(&th, sb, 1); | 2374 | err = journal_begin(&th, sb, 1); |
2375 | if (err) | 2375 | if (err) |
2376 | goto out; | 2376 | goto out; |
2377 | err = journal_end_sync(&th, sb); | 2377 | err = journal_end_sync(&th); |
2378 | if (err) | 2378 | if (err) |
2379 | goto out; | 2379 | goto out; |
2380 | } | 2380 | } |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index b923e6f315e1..a827d0b1cdb8 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); | 295 | jerror = journal_end(&th); |
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); | 604 | error2 = journal_end(&th); |
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 b51ab6ee7ba9..8d9f22c72429 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); | 42 | error2 = journal_end(&th); |
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; |