aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-11-01 10:00:38 -0600
committerJens Axboe <axboe@fb.com>2016-11-02 10:24:03 -0600
commit7637241e651ec36e409412869f986dd5f097735f (patch)
treef91af371cfe570476ba301a33bcb4c3780c430b1 /fs/f2fs
parentblock: add REQ_BACKGROUND (diff)
downloadwireguard-linux-7637241e651ec36e409412869f986dd5f097735f.tar.xz
wireguard-linux-7637241e651ec36e409412869f986dd5f097735f.zip
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/data.c2
-rw-r--r--fs/f2fs/node.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index b80bf10603d7..9e5561fa4cb6 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1249,7 +1249,7 @@ static int f2fs_write_data_page(struct page *page,
.sbi = sbi,
.type = DATA,
.op = REQ_OP_WRITE,
- .op_flags = (wbc->sync_mode == WB_SYNC_ALL) ? REQ_SYNC : 0,
+ .op_flags = wbc_to_write_flags(wbc),
.page = page,
.encrypted_page = NULL,
};
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 932f3f8bb57b..d1e29deb4598 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1570,7 +1570,7 @@ static int f2fs_write_node_page(struct page *page,
.sbi = sbi,
.type = NODE,
.op = REQ_OP_WRITE,
- .op_flags = (wbc->sync_mode == WB_SYNC_ALL) ? REQ_SYNC : 0,
+ .op_flags = wbc_to_write_flags(wbc),
.page = page,
.encrypted_page = NULL,
};