usb: gadget: webcam: Make g_webcam loadable again
[platform/kernel/linux-starfive.git] / fs / jbd2 / commit.c
index 8d6f934..5e12258 100644 (file)
@@ -119,7 +119,7 @@ static int journal_submit_commit_record(journal_t *journal,
        struct commit_header *tmp;
        struct buffer_head *bh;
        struct timespec64 now;
-       blk_opf_t write_flags = REQ_OP_WRITE | REQ_SYNC;
+       blk_opf_t write_flags = REQ_OP_WRITE | JBD2_JOURNAL_REQ_FLAGS;
 
        *cbh = NULL;
 
@@ -270,6 +270,7 @@ static int journal_finish_inode_data_buffers(journal_t *journal,
                        if (!ret)
                                ret = err;
                }
+               cond_resched();
                spin_lock(&journal->j_list_lock);
                jinode->i_flags &= ~JI_COMMIT_RUNNING;
                smp_mb();
@@ -395,8 +396,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                 */
                jbd2_journal_update_sb_log_tail(journal,
                                                journal->j_tail_sequence,
-                                               journal->j_tail,
-                                               REQ_SYNC);
+                                               journal->j_tail, 0);
                mutex_unlock(&journal->j_checkpoint_mutex);
        } else {
                jbd2_debug(3, "superblock not updated\n");
@@ -715,6 +715,7 @@ start_journal_io:
 
                        for (i = 0; i < bufs; i++) {
                                struct buffer_head *bh = wbuf[i];
+
                                /*
                                 * Compute checksum.
                                 */
@@ -727,7 +728,8 @@ start_journal_io:
                                clear_buffer_dirty(bh);
                                set_buffer_uptodate(bh);
                                bh->b_end_io = journal_end_buffer_io_sync;
-                               submit_bh(REQ_OP_WRITE | REQ_SYNC, bh);
+                               submit_bh(REQ_OP_WRITE | JBD2_JOURNAL_REQ_FLAGS,
+                                         bh);
                        }
                        cond_resched();