Commit abe48a52 authored by Kemeng Shi's avatar Kemeng Shi Committed by Theodore Ts'o

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: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240514112438.1269037-3-shikemeng@huaweicloud.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent cc102aa2
...@@ -353,7 +353,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) ...@@ -353,7 +353,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
struct buffer_head *descriptor; struct buffer_head *descriptor;
struct buffer_head **wbuf = journal->j_wbuf; struct buffer_head **wbuf = journal->j_wbuf;
int bufs; int bufs;
int flags; int escape;
int err; int err;
unsigned long long blocknr; unsigned long long blocknr;
ktime_t start_time; ktime_t start_time;
...@@ -660,10 +660,10 @@ void jbd2_journal_commit_transaction(journal_t *journal) ...@@ -660,10 +660,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
*/ */
set_bit(BH_JWrite, &jh2bh(jh)->b_state); set_bit(BH_JWrite, &jh2bh(jh)->b_state);
JBUFFER_TRACE(jh, "ph3: write metadata"); JBUFFER_TRACE(jh, "ph3: write metadata");
flags = jbd2_journal_write_metadata_buffer(commit_transaction, escape = jbd2_journal_write_metadata_buffer(commit_transaction,
jh, &wbuf[bufs], blocknr); jh, &wbuf[bufs], blocknr);
if (flags < 0) { if (escape < 0) {
jbd2_journal_abort(journal, flags); jbd2_journal_abort(journal, escape);
continue; continue;
} }
jbd2_file_log_bh(&io_bufs, wbuf[bufs]); jbd2_file_log_bh(&io_bufs, wbuf[bufs]);
...@@ -672,7 +672,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) ...@@ -672,7 +672,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
buffer */ buffer */
tag_flag = 0; tag_flag = 0;
if (flags & 1) if (escape)
tag_flag |= JBD2_FLAG_ESCAPE; tag_flag |= JBD2_FLAG_ESCAPE;
if (!first_tag) if (!first_tag)
tag_flag |= JBD2_FLAG_SAME_UUID; tag_flag |= JBD2_FLAG_SAME_UUID;
......
...@@ -316,11 +316,8 @@ static void journal_kill_thread(journal_t *journal) ...@@ -316,11 +316,8 @@ static void journal_kill_thread(journal_t *journal)
* *
* Return value: * Return value:
* <0: Error * <0: Error
* >=0: Finished OK * =0: Finished OK without escape
* * =1: Finished OK with escape
* On success:
* Bit 0 set == escape performed on the data
* Bit 1 set == buffer copy-out performed (kfree the data after IO)
*/ */
int jbd2_journal_write_metadata_buffer(transaction_t *transaction, int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
...@@ -455,7 +452,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction, ...@@ -455,7 +452,7 @@ int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
set_buffer_shadow(bh_in); set_buffer_shadow(bh_in);
spin_unlock(&jh_in->b_state_lock); spin_unlock(&jh_in->b_state_lock);
return do_escape | (done_copy_out << 1); return do_escape;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment