]> Git Repo - J-linux.git/blobdiff - fs/jbd2/commit.c
HID: hid-sensor-custom: Fix big on-stack allocation in hid_sensor_custom_get_known()
[J-linux.git] / fs / jbd2 / commit.c
index b2b2bc9b88d9d1fbe825d045c2161024db3ca8fc..4810438b7856aa39710b6b8d9eb6fee1f3b6c8b1 100644 (file)
@@ -122,8 +122,8 @@ static int journal_submit_commit_record(journal_t *journal,
 {
        struct commit_header *tmp;
        struct buffer_head *bh;
-       int ret;
        struct timespec64 now;
+       blk_opf_t write_flags = REQ_OP_WRITE | REQ_SYNC;
 
        *cbh = NULL;
 
@@ -155,13 +155,11 @@ static int journal_submit_commit_record(journal_t *journal,
 
        if (journal->j_flags & JBD2_BARRIER &&
            !jbd2_has_feature_async_commit(journal))
-               ret = submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH |
-                               REQ_FUA, bh);
-       else
-               ret = submit_bh(REQ_OP_WRITE | REQ_SYNC, bh);
+               write_flags |= REQ_PREFLUSH | REQ_FUA;
 
+       submit_bh(write_flags, bh);
        *cbh = bh;
-       return ret;
+       return 0;
 }
 
 /*
@@ -209,14 +207,13 @@ int jbd2_journal_submit_inode_data_buffers(struct jbd2_inode *jinode)
 }
 
 /* Send all the data buffers related to an inode */
-int jbd2_submit_inode_data(struct jbd2_inode *jinode)
+int jbd2_submit_inode_data(journal_t *journal, struct jbd2_inode *jinode)
 {
-
        if (!jinode || !(jinode->i_flags & JI_WRITE_DATA))
                return 0;
 
        trace_jbd2_submit_inode_data(jinode->i_vfs_inode);
-       return jbd2_journal_submit_inode_data_buffers(jinode);
+       return journal->j_submit_inode_data_buffers(jinode);
 
 }
 EXPORT_SYMBOL(jbd2_submit_inode_data);
@@ -570,7 +567,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
        journal->j_running_transaction = NULL;
        start_time = ktime_get();
        commit_transaction->t_log_start = journal->j_head;
-       wake_up(&journal->j_wait_transaction_locked);
+       wake_up_all(&journal->j_wait_transaction_locked);
        write_unlock(&journal->j_state_lock);
 
        jbd2_debug(3, "JBD2: commit phase 2a\n");
This page took 0.030628 seconds and 4 git commands to generate.