summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-08-01 15:38:44 (GMT)
committerJens Axboe <axboe@fb.com>2016-08-07 20:41:02 (GMT)
commitba13e83ec334ca8a1c6bec882a6efc98d8bf355d (patch)
tree85d06e869f009db6df96bba076f8be02dd6a34a6 /mm
parentc11f0c0b5bb949673e4fc16c742f0316ae4ced20 (diff)
downloadlinux-ba13e83ec334ca8a1c6bec882a6efc98d8bf355d.tar.xz
mm: make __swap_writepage() use bio_set_op_attrs()
Cleaner than manipulating bio->bi_rw flags directly. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_io.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index fb1fa26..16bd82fa 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);