diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-07-24 08:05:44 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-07-24 08:05:44 -0700 |
commit | 0606263f24f3d64960de742c55894190b5df903b (patch) | |
tree | 673894f227c1a761f601ad7bdc1ceef003bb85cb /fs/dax.c | |
parent | a72255983f12f31f0c8d8275fb1a781546cfacb7 (diff) | |
parent | d4c5725d57323e2348940fcc6416072671a9b432 (diff) | |
download | linux-0606263f24f3d64960de742c55894190b5df903b.tar.bz2 |
Merge branch 'for-4.8/libnvdimm' into libnvdimm-for-next
Diffstat (limited to 'fs/dax.c')
-rw-r--r-- | fs/dax.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -75,13 +75,13 @@ static long dax_map_atomic(struct block_device *bdev, struct blk_dax_ctl *dax) struct request_queue *q = bdev->bd_queue; long rc = -EIO; - dax->addr = (void __pmem *) ERR_PTR(-EIO); + dax->addr = ERR_PTR(-EIO); if (blk_queue_enter(q, true) != 0) return rc; rc = bdev_direct_access(bdev, dax); if (rc < 0) { - dax->addr = (void __pmem *) ERR_PTR(rc); + dax->addr = ERR_PTR(rc); blk_queue_exit(q); return rc; } @@ -147,12 +147,12 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, struct buffer_head *bh) { loff_t pos = start, max = start, bh_max = start; - bool hole = false, need_wmb = false; + bool hole = false; struct block_device *bdev = NULL; int rw = iov_iter_rw(iter), rc; long map_len = 0; struct blk_dax_ctl dax = { - .addr = (void __pmem *) ERR_PTR(-EIO), + .addr = ERR_PTR(-EIO), }; unsigned blkbits = inode->i_blkbits; sector_t file_blks = (i_size_read(inode) + (1 << blkbits) - 1) @@ -218,7 +218,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, if (iov_iter_rw(iter) == WRITE) { len = copy_from_iter_pmem(dax.addr, max - pos, iter); - need_wmb = true; } else if (!hole) len = copy_to_iter((void __force *) dax.addr, max - pos, iter); @@ -235,8 +234,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, dax.addr += len; } - if (need_wmb) - wmb_pmem(); dax_unmap_atomic(bdev, &dax); return (pos == start) ? rc : pos - start; @@ -788,7 +785,6 @@ int dax_writeback_mapping_range(struct address_space *mapping, return ret; } } - wmb_pmem(); return 0; } EXPORT_SYMBOL_GPL(dax_writeback_mapping_range); @@ -1232,7 +1228,6 @@ int __dax_zero_page_range(struct block_device *bdev, sector_t sector, if (dax_map_atomic(bdev, &dax) < 0) return PTR_ERR(dax.addr); clear_pmem(dax.addr + offset, length); - wmb_pmem(); dax_unmap_atomic(bdev, &dax); } return 0; |