diff options
author | Jeff Mahoney <jeffm@suse.com> | 2014-04-23 10:00:40 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-05-06 17:11:15 -0400 |
commit | b491dd1769f11c2cd07278c1e285a63ccb1918ae (patch) | |
tree | b663023eeeefb71c2a46f6316b963cb5954b08cb /fs/reiserfs | |
parent | 09f1b80ba8c967b6e17c0516e95578d5da18115f (diff) |
reiserfs: cleanup, remove blocks arg from journal_join
journal_join is always called with a block count of 1. Let's just get
rid of the argument.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/file.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 18 | ||||
-rw-r--r-- | fs/reiserfs/reiserfs.h | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index db8e3aeff9ff..1010c452c450 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -71,7 +71,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
71 | * aborted transaction | 71 | * aborted transaction |
72 | */ | 72 | */ |
73 | jbegin_failure = err; | 73 | jbegin_failure = err; |
74 | err = journal_join_abort(&th, inode->i_sb, 1); | 74 | err = journal_join_abort(&th, inode->i_sb); |
75 | 75 | ||
76 | if (err) { | 76 | if (err) { |
77 | /* | 77 | /* |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 688c7d2f0fc5..b0ceee401a26 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -90,7 +90,7 @@ static int flush_commit_list(struct super_block *s, | |||
90 | struct reiserfs_journal_list *jl, int flushall); | 90 | struct reiserfs_journal_list *jl, int flushall); |
91 | static int can_dirty(struct reiserfs_journal_cnode *cn); | 91 | static int can_dirty(struct reiserfs_journal_cnode *cn); |
92 | static int journal_join(struct reiserfs_transaction_handle *th, | 92 | static int journal_join(struct reiserfs_transaction_handle *th, |
93 | struct super_block *sb, unsigned long nblocks); | 93 | struct super_block *sb); |
94 | static void release_journal_dev(struct super_block *super, | 94 | static void release_journal_dev(struct super_block *super, |
95 | struct reiserfs_journal *journal); | 95 | struct reiserfs_journal *journal); |
96 | static int dirty_one_transaction(struct super_block *s, | 96 | static int dirty_one_transaction(struct super_block *s, |
@@ -1925,7 +1925,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1925 | * make sure something gets logged to force | 1925 | * make sure something gets logged to force |
1926 | * our way into the flush code | 1926 | * our way into the flush code |
1927 | */ | 1927 | */ |
1928 | if (!journal_join(&myth, sb, 1)) { | 1928 | if (!journal_join(&myth, sb)) { |
1929 | reiserfs_prepare_for_journal(sb, | 1929 | reiserfs_prepare_for_journal(sb, |
1930 | SB_BUFFER_WITH_SB(sb), | 1930 | SB_BUFFER_WITH_SB(sb), |
1931 | 1); | 1931 | 1); |
@@ -1938,7 +1938,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1938 | /* this also catches errors during the do_journal_end above */ | 1938 | /* this also catches errors during the do_journal_end above */ |
1939 | if (!error && reiserfs_is_journal_aborted(journal)) { | 1939 | if (!error && reiserfs_is_journal_aborted(journal)) { |
1940 | memset(&myth, 0, sizeof(myth)); | 1940 | memset(&myth, 0, sizeof(myth)); |
1941 | if (!journal_join_abort(&myth, sb, 1)) { | 1941 | if (!journal_join_abort(&myth, sb)) { |
1942 | reiserfs_prepare_for_journal(sb, | 1942 | reiserfs_prepare_for_journal(sb, |
1943 | SB_BUFFER_WITH_SB(sb), | 1943 | SB_BUFFER_WITH_SB(sb), |
1944 | 1); | 1944 | 1); |
@@ -3092,7 +3092,7 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th, | |||
3092 | } | 3092 | } |
3093 | goto relock; | 3093 | goto relock; |
3094 | } | 3094 | } |
3095 | retval = journal_join(&myth, sb, 1); | 3095 | retval = journal_join(&myth, sb); |
3096 | if (retval) | 3096 | if (retval) |
3097 | goto out_fail; | 3097 | goto out_fail; |
3098 | 3098 | ||
@@ -3181,7 +3181,7 @@ int reiserfs_end_persistent_transaction(struct reiserfs_transaction_handle *th) | |||
3181 | } | 3181 | } |
3182 | 3182 | ||
3183 | static int journal_join(struct reiserfs_transaction_handle *th, | 3183 | static int journal_join(struct reiserfs_transaction_handle *th, |
3184 | struct super_block *sb, unsigned long nblocks) | 3184 | struct super_block *sb) |
3185 | { | 3185 | { |
3186 | struct reiserfs_transaction_handle *cur_th = current->journal_info; | 3186 | struct reiserfs_transaction_handle *cur_th = current->journal_info; |
3187 | 3187 | ||
@@ -3191,11 +3191,11 @@ static int journal_join(struct reiserfs_transaction_handle *th, | |||
3191 | */ | 3191 | */ |
3192 | th->t_handle_save = cur_th; | 3192 | th->t_handle_save = cur_th; |
3193 | BUG_ON(cur_th && cur_th->t_refcount > 1); | 3193 | BUG_ON(cur_th && cur_th->t_refcount > 1); |
3194 | return do_journal_begin_r(th, sb, nblocks, JBEGIN_JOIN); | 3194 | return do_journal_begin_r(th, sb, 1, JBEGIN_JOIN); |
3195 | } | 3195 | } |
3196 | 3196 | ||
3197 | int journal_join_abort(struct reiserfs_transaction_handle *th, | 3197 | int journal_join_abort(struct reiserfs_transaction_handle *th, |
3198 | struct super_block *sb, unsigned long nblocks) | 3198 | struct super_block *sb) |
3199 | { | 3199 | { |
3200 | struct reiserfs_transaction_handle *cur_th = current->journal_info; | 3200 | struct reiserfs_transaction_handle *cur_th = current->journal_info; |
3201 | 3201 | ||
@@ -3205,7 +3205,7 @@ int journal_join_abort(struct reiserfs_transaction_handle *th, | |||
3205 | */ | 3205 | */ |
3206 | th->t_handle_save = cur_th; | 3206 | th->t_handle_save = cur_th; |
3207 | BUG_ON(cur_th && cur_th->t_refcount > 1); | 3207 | BUG_ON(cur_th && cur_th->t_refcount > 1); |
3208 | return do_journal_begin_r(th, sb, nblocks, JBEGIN_ABORT); | 3208 | return do_journal_begin_r(th, sb, 1, JBEGIN_ABORT); |
3209 | } | 3209 | } |
3210 | 3210 | ||
3211 | int journal_begin(struct reiserfs_transaction_handle *th, | 3211 | int journal_begin(struct reiserfs_transaction_handle *th, |
@@ -3571,7 +3571,7 @@ void reiserfs_flush_old_commits(struct super_block *sb) | |||
3571 | journal->j_trans_start_time > 0 && | 3571 | journal->j_trans_start_time > 0 && |
3572 | journal->j_len > 0 && | 3572 | journal->j_len > 0 && |
3573 | (now - journal->j_trans_start_time) > journal->j_max_trans_age) { | 3573 | (now - journal->j_trans_start_time) > journal->j_max_trans_age) { |
3574 | if (!journal_join(&th, sb, 1)) { | 3574 | if (!journal_join(&th, sb)) { |
3575 | reiserfs_prepare_for_journal(sb, | 3575 | reiserfs_prepare_for_journal(sb, |
3576 | SB_BUFFER_WITH_SB(sb), | 3576 | SB_BUFFER_WITH_SB(sb), |
3577 | 1); | 3577 | 1); |
diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index 86929c5a1851..40bb5cebab65 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h | |||
@@ -2924,7 +2924,7 @@ int reiserfs_in_journal(struct super_block *sb, unsigned int bmap_nr, | |||
2924 | int journal_begin(struct reiserfs_transaction_handle *, | 2924 | int journal_begin(struct reiserfs_transaction_handle *, |
2925 | struct super_block *sb, unsigned long); | 2925 | struct super_block *sb, unsigned long); |
2926 | int journal_join_abort(struct reiserfs_transaction_handle *, | 2926 | int journal_join_abort(struct reiserfs_transaction_handle *, |
2927 | struct super_block *sb, unsigned long); | 2927 | struct super_block *sb); |
2928 | void reiserfs_abort_journal(struct super_block *sb, int errno); | 2928 | void reiserfs_abort_journal(struct super_block *sb, int errno); |
2929 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); | 2929 | void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...); |
2930 | int reiserfs_allocate_list_bitmaps(struct super_block *s, | 2930 | int reiserfs_allocate_list_bitmaps(struct super_block *s, |