linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ira.weiny@intel.com
To: Dan Williams <dan.j.williams@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 2/3] fs/dax: Clarify nr_pages to dax_direct_access()
Date: Tue, 25 May 2021 10:24:27 -0700	[thread overview]
Message-ID: <20210525172428.3634316-3-ira.weiny@intel.com> (raw)
In-Reply-To: <20210525172428.3634316-1-ira.weiny@intel.com>

From: Ira Weiny <ira.weiny@intel.com>

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>
---
 fs/dax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dax.c b/fs/dax.c
index b3d27fdc6775..07621322aeee 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -710,7 +710,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;
-- 
2.28.0.rc0.12.gb6a658bd00c9


  parent reply	other threads:[~2021-05-25 17:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 17:24 [PATCH 0/3] DAX Small clean ups ira.weiny
2021-05-25 17:24 ` [PATCH 1/3] fs/fuse: Remove unneeded kaddr parameter ira.weiny
2021-06-11 17:23   ` Ira Weiny
2021-06-18  7:01     ` Miklos Szeredi
2021-06-18 12:49       ` Vivek Goyal
2021-05-25 17:24 ` ira.weiny [this message]
2021-05-25 17:24 ` [PATCH 3/3] dax: Ensure errno is returned from dax_direct_access ira.weiny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210525172428.3634316-3-ira.weiny@intel.com \
    --to=ira.weiny@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).