From: Dan Williams <dan.j.williams@intel.com> To: akpm@linux-foundation.org Cc: Jan Kara <jack@suse.cz>, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, hch@lst.de Subject: [PATCH 09/13] fs/dax: Assign NULL to pfn of dax_direct_access if useless Date: Wed, 04 Jul 2018 23:49:50 -0700 [thread overview] Message-ID: <153077339083.40830.7002878534903996422.stgit@dwillia2-desk3.amr.corp.intel.com> (raw) In-Reply-To: <153077334130.40830.2714147692560185329.stgit@dwillia2-desk3.amr.corp.intel.com> From: Huaisheng Ye <yehs1@lenovo.com> Some functions within fs/dax don't need to get pfn from direct_access. Assigning NULL to pfn of dax_direct_access is more intuitive and simple than offering a useless local variable. Signed-off-by: Huaisheng Ye <yehs1@lenovo.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- fs/dax.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 641192808bb6..28264ff4e343 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -647,7 +647,6 @@ static int copy_user_dax(struct block_device *bdev, struct dax_device *dax_dev, { void *vto, *kaddr; pgoff_t pgoff; - pfn_t pfn; long rc; int id; @@ -656,7 +655,7 @@ static int copy_user_dax(struct block_device *bdev, struct dax_device *dax_dev, return rc; id = dax_read_lock(); - rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr, &pfn); + rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr, NULL); if (rc < 0) { dax_read_unlock(id); return rc; @@ -1052,15 +1051,13 @@ int __dax_zero_page_range(struct block_device *bdev, pgoff_t pgoff; long rc, id; void *kaddr; - pfn_t pfn; rc = bdev_dax_pgoff(bdev, sector, PAGE_SIZE, &pgoff); if (rc) return rc; id = dax_read_lock(); - rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, - &pfn); + rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, NULL); if (rc < 0) { dax_read_unlock(id); return rc; @@ -1116,7 +1113,6 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, ssize_t map_len; pgoff_t pgoff; void *kaddr; - pfn_t pfn; if (fatal_signal_pending(current)) { ret = -EINTR; @@ -1128,7 +1124,7 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, break; map_len = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), - &kaddr, &pfn); + &kaddr, NULL); if (map_len < 0) { ret = map_len; break; _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com> To: akpm@linux-foundation.org Cc: Huaisheng Ye <yehs1@lenovo.com>, Jan Kara <jack@suse.cz>, vishal.l.verma@intel.com, hch@lst.de, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/13] fs/dax: Assign NULL to pfn of dax_direct_access if useless Date: Wed, 04 Jul 2018 23:49:50 -0700 [thread overview] Message-ID: <153077339083.40830.7002878534903996422.stgit@dwillia2-desk3.amr.corp.intel.com> (raw) In-Reply-To: <153077334130.40830.2714147692560185329.stgit@dwillia2-desk3.amr.corp.intel.com> From: Huaisheng Ye <yehs1@lenovo.com> Some functions within fs/dax don't need to get pfn from direct_access. Assigning NULL to pfn of dax_direct_access is more intuitive and simple than offering a useless local variable. Signed-off-by: Huaisheng Ye <yehs1@lenovo.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- fs/dax.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 641192808bb6..28264ff4e343 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -647,7 +647,6 @@ static int copy_user_dax(struct block_device *bdev, struct dax_device *dax_dev, { void *vto, *kaddr; pgoff_t pgoff; - pfn_t pfn; long rc; int id; @@ -656,7 +655,7 @@ static int copy_user_dax(struct block_device *bdev, struct dax_device *dax_dev, return rc; id = dax_read_lock(); - rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr, &pfn); + rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr, NULL); if (rc < 0) { dax_read_unlock(id); return rc; @@ -1052,15 +1051,13 @@ int __dax_zero_page_range(struct block_device *bdev, pgoff_t pgoff; long rc, id; void *kaddr; - pfn_t pfn; rc = bdev_dax_pgoff(bdev, sector, PAGE_SIZE, &pgoff); if (rc) return rc; id = dax_read_lock(); - rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, - &pfn); + rc = dax_direct_access(dax_dev, pgoff, 1, &kaddr, NULL); if (rc < 0) { dax_read_unlock(id); return rc; @@ -1116,7 +1113,6 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, ssize_t map_len; pgoff_t pgoff; void *kaddr; - pfn_t pfn; if (fatal_signal_pending(current)) { ret = -EINTR; @@ -1128,7 +1124,7 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, break; map_len = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), - &kaddr, &pfn); + &kaddr, NULL); if (map_len < 0) { ret = map_len; break;
next prev parent reply other threads:[~2018-07-05 6:59 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-07-05 6:49 [PATCH 00/13] mm: Asynchronous + multithreaded memmap init for ZONE_DEVICE Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 01/13] mm: Plumb dev_pagemap instead of vmem_altmap to memmap_init_zone() Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 02/13] mm: Enable asynchronous __add_pages() and vmemmap_populate_hugepages() Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 03/13] mm: Teach memmap_init_zone() to initialize ZONE_DEVICE pages Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 04/13] mm: Multithread ZONE_DEVICE initialization Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 05/13] mm: Allow an external agent to wait for memmap initialization Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 06/13] nvdimm/pmem: check the validity of the pointer pfn Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 07/13] nvdimm/pmem-dax: " Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` [PATCH 08/13] s390/block/dcssblk: " Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:49 ` Dan Williams [this message] 2018-07-05 6:49 ` [PATCH 09/13] fs/dax: Assign NULL to pfn of dax_direct_access if useless Dan Williams 2018-07-05 6:49 ` [PATCH 10/13] filesystem-dax: Make mount time pfn validation a debug check Dan Williams 2018-07-05 6:49 ` Dan Williams 2018-07-05 6:50 ` [PATCH 11/13] libnvdimm, pmem: Initialize the memmap in the background Dan Williams 2018-07-05 6:50 ` Dan Williams 2018-07-05 6:50 ` [PATCH 12/13] device-dax: " Dan Williams 2018-07-05 6:50 ` Dan Williams 2018-07-05 6:50 ` [PATCH 13/13] libnvdimm, namespace: Publish page structure init state / control Dan Williams 2018-07-05 6:50 ` Dan Williams 2018-07-05 8:29 ` Johannes Thumshirn 2018-07-05 8:29 ` Johannes Thumshirn 2018-07-05 8:29 ` Johannes Thumshirn 2018-07-05 14:46 ` Dan Williams 2018-07-05 14:46 ` Dan Williams 2018-07-05 14:49 ` Johannes Thumshirn 2018-07-05 14:49 ` Johannes Thumshirn 2018-07-05 14:49 ` Johannes Thumshirn 2018-07-05 20:24 ` Andrew Morton 2018-07-05 20:24 ` Andrew Morton 2018-07-05 20:34 ` Dan Williams 2018-07-05 20:34 ` Dan Williams 2018-07-06 8:18 ` Johannes Thumshirn 2018-07-06 8:18 ` Johannes Thumshirn 2018-07-06 8:18 ` Johannes Thumshirn 2018-07-05 21:00 ` Matthew Wilcox 2018-07-05 21:00 ` Matthew Wilcox 2018-07-05 19:49 ` Matthew Wilcox 2018-07-05 19:49 ` Matthew Wilcox 2018-07-05 19:52 ` Dan Williams 2018-07-05 19:52 ` Dan Williams 2018-07-05 20:00 ` Jeff Moyer 2018-07-09 12:56 ` [PATCH 00/13] mm: Asynchronous + multithreaded memmap init for ZONE_DEVICE Jan Kara 2018-07-09 12:56 ` Jan Kara 2018-07-09 16:53 ` Dan Williams
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=153077339083.40830.7002878534903996422.stgit@dwillia2-desk3.amr.corp.intel.com \ --to=dan.j.williams@intel.com \ --cc=akpm@linux-foundation.org \ --cc=hch@lst.de \ --cc=jack@suse.cz \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-nvdimm@lists.01.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.