]> www.infradead.org Git - linux.git/commitdiff
jbd2: remove unused return info from jbd2_journal_write_metadata_buffer
authorKemeng Shi <shikemeng@huaweicloud.com>
Tue, 14 May 2024 11:24:31 +0000 (19:24 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 27 Jun 2024 14:20:26 +0000 (10:20 -0400)
The done_copy_out info from jbd2_journal_write_metadata_buffer is not
used. Simply remove it.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240514112438.1269037-3-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/commit.c
fs/jbd2/journal.c

index 75ea4e9a5cabd40e2e775db4cecd93807f14e191..6d3fc992287d8ebab0e3f6e93a96eaf5a88a576e 100644 (file)
@@ -353,7 +353,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
        struct buffer_head *descriptor;
        struct buffer_head **wbuf = journal->j_wbuf;
        int bufs;
-       int flags;
+       int escape;
        int err;
        unsigned long long blocknr;
        ktime_t start_time;
@@ -660,10 +660,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                 */
                set_bit(BH_JWrite, &jh2bh(jh)->b_state);
                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);
-               if (flags < 0) {
-                       jbd2_journal_abort(journal, flags);
+               if (escape < 0) {
+                       jbd2_journal_abort(journal, escape);
                        continue;
                }
                jbd2_file_log_bh(&io_bufs, wbuf[bufs]);
@@ -672,7 +672,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                    buffer */
 
                tag_flag = 0;
-               if (flags & 1)
+               if (escape)
                        tag_flag |= JBD2_FLAG_ESCAPE;
                if (!first_tag)
                        tag_flag |= JBD2_FLAG_SAME_UUID;
index 5ad255ffb289c78ec232d198ad404eed08bd33f6..667272239889314ae993f48d8967360029e66ad5 100644 (file)
@@ -316,11 +316,8 @@ static void journal_kill_thread(journal_t *journal)
  *
  * Return value:
  *  <0: Error
- * >=0: Finished OK
- *
- * On success:
- * Bit 0 set == escape performed on the data
- * Bit 1 set == buffer copy-out performed (kfree the data after IO)
+ *  =0: Finished OK without escape
+ *  =1: Finished OK with escape
  */
 
 int jbd2_journal_write_metadata_buffer(transaction_t *transaction,
@@ -455,7 +452,7 @@ repeat:
        set_buffer_shadow(bh_in);
        spin_unlock(&jh_in->b_state_lock);
 
-       return do_escape | (done_copy_out << 1);
+       return do_escape;
 }
 
 /*