Skip to content

Commit 4478859

Browse files
weiny2djbw
authored andcommitted
fs/dax: Clarify nr_pages to dax_direct_access()
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 <dan.j.williams@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20210525172428.3634316-3-ira.weiny@intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 2e29be2 commit 4478859

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/dax.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ static int copy_cow_page_dax(struct block_device *bdev, struct dax_device *dax_d
721721
return rc;
722722

723723
id = dax_read_lock();
724-
rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(PAGE_SIZE), &kaddr, NULL);
724+
rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, NULL);
725725
if (rc < 0) {
726726
dax_read_unlock(id);
727727
return rc;

0 commit comments

Comments
 (0)