]> Git Repo - J-linux.git/commitdiff
fs/dax: Clarify nr_pages to dax_direct_access()
authorIra Weiny <[email protected]>
Tue, 25 May 2021 17:24:27 +0000 (10:24 -0700)
committerDan Williams <[email protected]>
Thu, 8 Jul 2021 05:10:03 +0000 (22:10 -0700)
dax_direct_access() takes a number of pages.  PHYS_PFN(PAGE_SIZE) is a
very round about way to specify '1'.

Change the nr_pages parameter to the explicit value of '1'.

Reviewed-by: Dan Williams <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
fs/dax.c

index 62352cbcf0f40db11ea9f04a4b4e69bba22eba54..8ce3a7e147a804ac4bd956f062d8033c9234aee4 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -721,7 +721,7 @@ static int copy_cow_page_dax(struct block_device *bdev, struct dax_device *dax_d
                return rc;
 
        id = dax_read_lock();
-       rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(PAGE_SIZE), &kaddr, NULL);
+       rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, NULL);
        if (rc < 0) {
                dax_read_unlock(id);
                return rc;
This page took 0.046786 seconds and 4 git commands to generate.