diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-08 02:38:45 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-08 02:38:45 +0300 |
commit | 857953d72f3744f325de93320cc2673795e9ca89 (patch) | |
tree | b4253224fd74148708bd1fb210e4155e22ee7b63 /drivers/nvdimm/btt.c | |
parent | 635a4ba111e3bd0169fd549b24fe108b1f171713 (diff) | |
parent | 1eff9d322a444245c67515edb52bc0eb68374aa8 (diff) | |
download | linux-857953d72f3744f325de93320cc2673795e9ca89.tar.xz |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull more block fixes from Jens Axboe:
"As mentioned in the pull the other day, a few more fixes for this
round, all related to the bio op changes in this series.
Two fixes, and then a cleanup, renaming bio->bi_rw to bio->bi_opf. I
wanted to do that change right after or right before -rc1, so that
risk of conflict was reduced. I just rebased the series on top of
current master, and no new ->bi_rw usage has snuck in"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: rename bio bi_rw to bi_opf
target: iblock_execute_sync_cache() should use bio_set_op_attrs()
mm: make __swap_writepage() use bio_set_op_attrs()
block/mm: make bdev_ops->rw_page() take a bool for read/write
Diffstat (limited to 'drivers/nvdimm/btt.c')
-rw-r--r-- | drivers/nvdimm/btt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 7cf3bdfaf809..88e91666f145 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1133,11 +1133,11 @@ static int btt_write_pg(struct btt *btt, struct bio_integrity_payload *bip, static int btt_do_bvec(struct btt *btt, struct bio_integrity_payload *bip, struct page *page, unsigned int len, unsigned int off, - int op, sector_t sector) + bool is_write, sector_t sector) { int ret; - if (!op_is_write(op)) { + if (!is_write) { ret = btt_read_pg(btt, bip, page, off, sector, len); flush_dcache_page(page); } else { @@ -1180,7 +1180,7 @@ static blk_qc_t btt_make_request(struct request_queue *q, struct bio *bio) BUG_ON(len % btt->sector_size); err = btt_do_bvec(btt, bip, bvec.bv_page, len, bvec.bv_offset, - bio_op(bio), iter.bi_sector); + op_is_write(bio_op(bio)), iter.bi_sector); if (err) { dev_info(&btt->nd_btt->dev, "io error in %s sector %lld, len %d,\n", @@ -1200,12 +1200,12 @@ out: } static int btt_rw_page(struct block_device *bdev, sector_t sector, - struct page *page, int op) + struct page *page, bool is_write) { struct btt *btt = bdev->bd_disk->private_data; - btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, op, sector); - page_endio(page, op, 0); + btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, is_write, sector); + page_endio(page, is_write, 0); return 0; } |