Skip to content

Commit abe48a5

Browse files
Kemeng Shitytso
authored andcommitted
jbd2: remove unused return info from jbd2_journal_write_metadata_buffer
The done_copy_out info from jbd2_journal_write_metadata_buffer is not used. Simply remove it. Signed-off-by: Kemeng Shi <[email protected]> Reviewed-by: Zhang Yi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent cc102aa commit abe48a5

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

fs/jbd2/commit.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
353353
struct buffer_head *descriptor;
354354
struct buffer_head **wbuf = journal->j_wbuf;
355355
int bufs;
356-
int flags;
356+
int escape;
357357
int err;
358358
unsigned long long blocknr;
359359
ktime_t start_time;
@@ -660,10 +660,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
660660
*/
661661
set_bit(BH_JWrite, &jh2bh(jh)->b_state);
662662
JBUFFER_TRACE(jh, "ph3: write metadata");
663-
flags = jbd2_journal_write_metadata_buffer(commit_transaction,
663+
escape = jbd2_journal_write_metadata_buffer(commit_transaction,
664664
jh, &wbuf[bufs], blocknr);
665-
if (flags < 0) {
666-
jbd2_journal_abort(journal, flags);
665+
if (escape < 0) {
666+
jbd2_journal_abort(journal, escape);
667667
continue;
668668
}
669669
jbd2_file_log_bh(&io_bufs, wbuf[bufs]);
@@ -672,7 +672,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
672672
buffer */
673673

674674
tag_flag = 0;
675-
if (flags & 1)
675+
if (escape)
676676
tag_flag |= JBD2_FLAG_ESCAPE;
677677
if (!first_tag)
678678
tag_flag |= JBD2_FLAG_SAME_UUID;

fs/jbd2/journal.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,8 @@ static void journal_kill_thread(journal_t *journal)
316316
*
317317
* Return value:
318318
* <0: Error
319-
* >=0: Finished OK
320-
*
321-
* On success:
322-
* Bit 0 set == escape performed on the data
323-
* Bit 1 set == buffer copy-out performed (kfree the data after IO)
319+
* =0: Finished OK without escape
320+
* =1: Finished OK with escape
324321
*/
325322

326323
int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
@@ -455,7 +452,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
455452
set_buffer_shadow(bh_in);
456453
spin_unlock(&jh_in->b_state_lock);
457454

458-
return do_escape | (done_copy_out << 1);
455+
return do_escape;
459456
}
460457

461458
/*

0 commit comments

Comments
 (0)