From: Jens Axboe Date: Mon, 1 Aug 2016 15:38:44 +0000 (-0600) Subject: mm: make __swap_writepage() use bio_set_op_attrs() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ba13e83ec334ca8a1c6bec882a6efc98d8bf355d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm: make __swap_writepage() use bio_set_op_attrs() Cleaner than manipulating bio->bi_rw flags directly. Signed-off-by: Jens Axboe --- diff --git a/mm/page_io.c b/mm/page_io.c index fb1fa269d3a0..16bd82fad38c 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -319,9 +319,10 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, ret = -ENOMEM; goto out; } - bio_set_op_attrs(bio, REQ_OP_WRITE, 0); if (wbc->sync_mode == WB_SYNC_ALL) - bio->bi_rw |= REQ_SYNC; + bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC); + else + bio_set_op_attrs(bio, REQ_OP_WRITE, 0); count_vm_event(PSWPOUT); set_page_writeback(page); unlock_page(page);