You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
writeback: add wbc_to_write_flags()
Add wbc_to_write_flags(), which returns the write modifier flags to use, based on a struct writeback_control. No functional changes in this patch, but it prepares us for factoring other wbc fields for write type. Signed-off-by: Jens Axboe <axboe@fb.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
+1
-4
@@ -320,10 +320,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
if (wbc->sync_mode == WB_SYNC_ALL)
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC);
|
||||
else
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
|
||||
bio->bi_opf = REQ_OP_WRITE | wbc_to_write_flags(wbc);
|
||||
count_vm_event(PSWPOUT);
|
||||
set_page_writeback(page);
|
||||
unlock_page(page);
|
||||
|
||||
Reference in New Issue
Block a user