]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/dax.c
Merge tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
[mirror_ubuntu-artful-kernel.git] / fs / dax.c
index cd8fced592d0a1b8e1a4bf0db591f375793fc79d..b1cd18dcc17754354ac1fd7c880c8366547719a2 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -25,7 +25,6 @@
 #include <linux/mm.h>
 #include <linux/mutex.h>
 #include <linux/pagevec.h>
-#include <linux/pmem.h>
 #include <linux/sched.h>
 #include <linux/sched/signal.h>
 #include <linux/uio.h>
@@ -784,7 +783,7 @@ static int dax_writeback_one(struct block_device *bdev,
        }
 
        dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn));
-       wb_cache_pmem(kaddr, size);
+       dax_flush(dax_dev, pgoff, kaddr, size);
        /*
         * After we have flushed the cache, we can clear the dirty tag. There
         * cannot be new dirty data in the pfn after the flush has completed as
@@ -976,7 +975,8 @@ int __dax_zero_page_range(struct block_device *bdev,
                        dax_read_unlock(id);
                        return rc;
                }
-               clear_pmem(kaddr + offset, size);
+               memset(kaddr + offset, 0, size);
+               dax_flush(dax_dev, pgoff, kaddr + offset, size);
                dax_read_unlock(id);
        }
        return 0;
@@ -1055,7 +1055,8 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
                        map_len = end - pos;
 
                if (iov_iter_rw(iter) == WRITE)
-                       map_len = copy_from_iter_pmem(kaddr, map_len, iter);
+                       map_len = dax_copy_from_iter(dax_dev, pgoff, kaddr,
+                                       map_len, iter);
                else
                        map_len = copy_to_iter(kaddr, map_len, iter);
                if (map_len <= 0) {