Commit 14df6a4e authored by Dan Williams's avatar Dan Williams

fs/dax: remove wmb_pmem()

Flushing posted-write queues is now deferred to REQ_FLUSH context, or
otherwise handled by an ADR event at the platform level.

Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 476f848a
...@@ -147,7 +147,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, ...@@ -147,7 +147,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
struct buffer_head *bh) struct buffer_head *bh)
{ {
loff_t pos = start, max = start, bh_max = start; loff_t pos = start, max = start, bh_max = start;
bool hole = false, need_wmb = false; bool hole = false;
struct block_device *bdev = NULL; struct block_device *bdev = NULL;
int rw = iov_iter_rw(iter), rc; int rw = iov_iter_rw(iter), rc;
long map_len = 0; long map_len = 0;
...@@ -213,7 +213,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, ...@@ -213,7 +213,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
if (iov_iter_rw(iter) == WRITE) { if (iov_iter_rw(iter) == WRITE) {
len = copy_from_iter_pmem(dax.addr, max - pos, iter); len = copy_from_iter_pmem(dax.addr, max - pos, iter);
need_wmb = true;
} else if (!hole) } else if (!hole)
len = copy_to_iter((void __force *) dax.addr, max - pos, len = copy_to_iter((void __force *) dax.addr, max - pos,
iter); iter);
...@@ -230,8 +229,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, ...@@ -230,8 +229,6 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
dax.addr += len; dax.addr += len;
} }
if (need_wmb)
wmb_pmem();
dax_unmap_atomic(bdev, &dax); dax_unmap_atomic(bdev, &dax);
return (pos == start) ? rc : pos - start; return (pos == start) ? rc : pos - start;
...@@ -783,7 +780,6 @@ int dax_writeback_mapping_range(struct address_space *mapping, ...@@ -783,7 +780,6 @@ int dax_writeback_mapping_range(struct address_space *mapping,
return ret; return ret;
} }
} }
wmb_pmem();
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(dax_writeback_mapping_range); EXPORT_SYMBOL_GPL(dax_writeback_mapping_range);
...@@ -1227,7 +1223,6 @@ int __dax_zero_page_range(struct block_device *bdev, sector_t sector, ...@@ -1227,7 +1223,6 @@ int __dax_zero_page_range(struct block_device *bdev, sector_t sector,
if (dax_map_atomic(bdev, &dax) < 0) if (dax_map_atomic(bdev, &dax) < 0)
return PTR_ERR(dax.addr); return PTR_ERR(dax.addr);
clear_pmem(dax.addr + offset, length); clear_pmem(dax.addr + offset, length);
wmb_pmem();
dax_unmap_atomic(bdev, &dax); dax_unmap_atomic(bdev, &dax);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment