diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-13 19:45:48 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-11-13 19:46:35 -0500 |
commit | 9bb10743f6035a229269d988fbd6d648859dbab0 (patch) | |
tree | e66d5f7a07a4b03126ae75c1863a9f5e6734f995 | |
parent | a6dcf137fca59041b78c1578563242d93a8f4808 (diff) |
bcachefs: Use wbc_to_write_flags()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/fs-io.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index fd6eb00e144c..0f1a678a0a1a 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -1089,6 +1089,7 @@ static void bch2_writepage_do_io(struct bch_writepage_state *w) * possible, else allocating a new one: */ static void bch2_writepage_io_alloc(struct bch_fs *c, + struct writeback_control *wbc, struct bch_writepage_state *w, struct bch_inode_info *inode, u64 sector, @@ -1113,6 +1114,7 @@ static void bch2_writepage_io_alloc(struct bch_fs *c, op->write_point = writepoint_hashed(inode->ei_last_dirtied); op->pos = POS(inode->v.i_ino, sector); op->wbio.bio.bi_iter.bi_sector = sector; + op->wbio.bio.bi_opf = wbc_to_write_flags(wbc); } static int __bch2_writepage(struct page *page, @@ -1223,7 +1225,7 @@ do_io: bch2_writepage_do_io(w); if (!w->io) - bch2_writepage_io_alloc(c, w, inode, sector, + bch2_writepage_io_alloc(c, wbc, w, inode, sector, nr_replicas_this_write); atomic_inc(&s->write_count); @@ -1240,9 +1242,6 @@ do_io: w->io->op.i_sectors_delta -= dirty_sectors; w->io->op.new_i_size = i_size; - if (wbc->sync_mode == WB_SYNC_ALL) - w->io->op.wbio.bio.bi_opf |= REQ_SYNC; - offset += sectors; } |