Commit ba13e83e authored by Jens Axboe's avatar Jens Axboe

mm: make __swap_writepage() use bio_set_op_attrs()

Cleaner than manipulating bio->bi_rw flags directly.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent c11f0c0b
...@@ -319,9 +319,10 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, ...@@ -319,9 +319,10 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
if (wbc->sync_mode == WB_SYNC_ALL) 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); count_vm_event(PSWPOUT);
set_page_writeback(page); set_page_writeback(page);
unlock_page(page); unlock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment