Merge tag 'gfs2-4.11.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[sfrench/cifs-2.6.git] / fs / gfs2 / log.c
index 4fb76c04e65b729ec56549ce88ca0543c426e06a..f865b96374df2b5c40ecfb13663154499ec09b31 100644 (file)
@@ -659,7 +659,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
        struct gfs2_log_header *lh;
        unsigned int tail;
        u32 hash;
-       int op_flags = WRITE_FLUSH_FUA | REQ_META;
+       int op_flags = REQ_PREFLUSH | REQ_FUA | REQ_META;
        struct page *page = mempool_alloc(gfs2_page_pool, GFP_NOIO);
        enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state);
        lh = page_address(page);
@@ -684,7 +684,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags)
        if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) {
                gfs2_ordered_wait(sdp);
                log_flush_wait(sdp);
-               op_flags = WRITE_SYNC | REQ_META | REQ_PRIO;
+               op_flags = REQ_SYNC | REQ_META | REQ_PRIO;
        }
 
        sdp->sd_log_idle = (tail == sdp->sd_log_flush_head);