}
-static int submit_extent_page(unsigned int op, unsigned int op_flags,
- struct extent_io_tree *tree,
+/*
+ * @opf: bio REQ_OP_* and REQ_* flags as one value
+ */
+static int submit_extent_page(unsigned int opf, struct extent_io_tree *tree,
struct writeback_control *wbc,
struct page *page, sector_t sector,
size_t size, unsigned long offset,
bio->bi_end_io = end_io_func;
bio->bi_private = tree;
bio->bi_write_hint = page->mapping->host->i_write_hint;
- bio_set_op_attrs(bio, op, op_flags);
+ bio->bi_opf = opf;
if (wbc) {
wbc_init_bio(wbc, bio);
wbc_account_io(wbc, page, page_size);
continue;
}
- ret = submit_extent_page(REQ_OP_READ, read_flags, tree, NULL,
+ ret = submit_extent_page(REQ_OP_READ | read_flags, tree, NULL,
page, sector, disk_io_size, pg_offset,
bdev, bio,
end_bio_extent_readpage, mirror_num,
page->index, cur, end);
}
- ret = submit_extent_page(REQ_OP_WRITE, write_flags, tree, wbc,
+ ret = submit_extent_page(REQ_OP_WRITE | write_flags, tree, wbc,
page, sector, iosize, pg_offset,
bdev, &epd->bio,
end_bio_extent_writepage,
clear_page_dirty_for_io(p);
set_page_writeback(p);
- ret = submit_extent_page(REQ_OP_WRITE, write_flags, tree, wbc,
+ ret = submit_extent_page(REQ_OP_WRITE | write_flags, tree, wbc,
p, offset >> 9, PAGE_SIZE, 0, bdev,
&epd->bio,
end_bio_extent_buffer_writepage,