Skip to content

Commit b491dd1

Browse files
jeffmahoneyjankara
authored andcommitted
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>
1 parent 09f1b80 commit b491dd1

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎fs/reiserfs/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp)
7171
* aborted transaction
7272
*/
7373
jbegin_failure = err;
74-
err = journal_join_abort(&th, inode->i_sb, 1);
74+
err = journal_join_abort(&th, inode->i_sb);
7575

7676
if (err) {
7777
/*

‎fs/reiserfs/journal.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int flush_commit_list(struct super_block *s,
9090
struct reiserfs_journal_list *jl, int flushall);
9191
static int can_dirty(struct reiserfs_journal_cnode *cn);
9292
static int journal_join(struct reiserfs_transaction_handle *th,
93-
struct super_block *sb, unsigned long nblocks);
93+
struct super_block *sb);
9494
static void release_journal_dev(struct super_block *super,
9595
struct reiserfs_journal *journal);
9696
static int dirty_one_transaction(struct super_block *s,
@@ -1925,7 +1925,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
19251925
* make sure something gets logged to force
19261926
* our way into the flush code
19271927
*/
1928-
if (!journal_join(&myth, sb, 1)) {
1928+
if (!journal_join(&myth, sb)) {
19291929
reiserfs_prepare_for_journal(sb,
19301930
SB_BUFFER_WITH_SB(sb),
19311931
1);
@@ -1938,7 +1938,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th,
19381938
/* this also catches errors during the do_journal_end above */
19391939
if (!error && reiserfs_is_journal_aborted(journal)) {
19401940
memset(&myth, 0, sizeof(myth));
1941-
if (!journal_join_abort(&myth, sb, 1)) {
1941+
if (!journal_join_abort(&myth, sb)) {
19421942
reiserfs_prepare_for_journal(sb,
19431943
SB_BUFFER_WITH_SB(sb),
19441944
1);
@@ -3092,7 +3092,7 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th,
30923092
}
30933093
goto relock;
30943094
}
3095-
retval = journal_join(&myth, sb, 1);
3095+
retval = journal_join(&myth, sb);
30963096
if (retval)
30973097
goto out_fail;
30983098

@@ -3181,7 +3181,7 @@ int reiserfs_end_persistent_transaction(struct reiserfs_transaction_handle *th)
31813181
}
31823182

31833183
static int journal_join(struct reiserfs_transaction_handle *th,
3184-
struct super_block *sb, unsigned long nblocks)
3184+
struct super_block *sb)
31853185
{
31863186
struct reiserfs_transaction_handle *cur_th = current->journal_info;
31873187

@@ -3191,11 +3191,11 @@ static int journal_join(struct reiserfs_transaction_handle *th,
31913191
*/
31923192
th->t_handle_save = cur_th;
31933193
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);
31953195
}
31963196

31973197
int journal_join_abort(struct reiserfs_transaction_handle *th,
3198-
struct super_block *sb, unsigned long nblocks)
3198+
struct super_block *sb)
31993199
{
32003200
struct reiserfs_transaction_handle *cur_th = current->journal_info;
32013201

@@ -3205,7 +3205,7 @@ int journal_join_abort(struct reiserfs_transaction_handle *th,
32053205
*/
32063206
th->t_handle_save = cur_th;
32073207
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);
32093209
}
32103210

32113211
int journal_begin(struct reiserfs_transaction_handle *th,
@@ -3571,7 +3571,7 @@ void reiserfs_flush_old_commits(struct super_block *sb)
35713571
journal->j_trans_start_time > 0 &&
35723572
journal->j_len > 0 &&
35733573
(now - journal->j_trans_start_time) > journal->j_max_trans_age) {
3574-
if (!journal_join(&th, sb, 1)) {
3574+
if (!journal_join(&th, sb)) {
35753575
reiserfs_prepare_for_journal(sb,
35763576
SB_BUFFER_WITH_SB(sb),
35773577
1);

‎fs/reiserfs/reiserfs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2924,7 +2924,7 @@ int reiserfs_in_journal(struct super_block *sb, unsigned int bmap_nr,
29242924
int journal_begin(struct reiserfs_transaction_handle *,
29252925
struct super_block *sb, unsigned long);
29262926
int journal_join_abort(struct reiserfs_transaction_handle *,
2927-
struct super_block *sb, unsigned long);
2927+
struct super_block *sb);
29282928
void reiserfs_abort_journal(struct super_block *sb, int errno);
29292929
void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...);
29302930
int reiserfs_allocate_list_bitmaps(struct super_block *s,

0 commit comments

Comments
 (0)