nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Matthew Wilcox <willy@infradead.org>, linux-nvdimm@lists.01.org
Subject: Re: [PATCH] dax: Fix use of zero page
Date: Thu, 30 Aug 2018 14:43:55 -0700	[thread overview]
Message-ID: <96487ace-f807-5df5-49e1-a888ad26af3e@intel.com> (raw)
In-Reply-To: <20180830162032.GA25345@bombadil.infradead.org>



On 08/30/2018 09:20 AM, Matthew Wilcox wrote:
> 
> This patch got caught in the crossfire and didn't make it into 4.18
> as planned.  Can it make 4.19 please?
> 
> ---- >8 ----
> 
> Use my_zero_pfn instead of ZERO_PAGE, and pass the vaddr to it so it
> works on MIPS and s390.
> 
> Signed-off-by: Matthew Wilcox <willy@infradead.org>
> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>

Applied

> ---
>  fs/dax.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/dax.c b/fs/dax.c
> index 467601a134bc..c7917b46a75b 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -1093,21 +1093,12 @@ static vm_fault_t dax_load_hole(struct address_space *mapping, void *entry,
>  {
>  	struct inode *inode = mapping->host;
>  	unsigned long vaddr = vmf->address;
> -	vm_fault_t ret = VM_FAULT_NOPAGE;
> -	struct page *zero_page;
> -	pfn_t pfn;
> -
> -	zero_page = ZERO_PAGE(0);
> -	if (unlikely(!zero_page)) {
> -		ret = VM_FAULT_OOM;
> -		goto out;
> -	}
> +	pfn_t pfn = pfn_to_pfn_t(my_zero_pfn(vaddr));
> +	vm_fault_t ret;
>  
> -	pfn = page_to_pfn_t(zero_page);
>  	dax_insert_mapping_entry(mapping, vmf, entry, pfn, RADIX_DAX_ZERO_PAGE,
>  			false);
>  	ret = vmf_insert_mixed(vmf->vma, vaddr, pfn);
> -out:
>  	trace_dax_load_hole(inode, vmf, ret);
>  	return ret;
>  }
> 
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-08-30 21:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 16:20 [PATCH] dax: Fix use of zero page Matthew Wilcox
2018-08-30 21:43 ` Dave Jiang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-17 18:37 Matthew Wilcox
2018-05-17 19:24 ` Ross Zwisler
2018-05-17 19:29   ` Ross Zwisler
2018-05-17 19:57     ` Matthew Wilcox
2018-05-17 20:48       ` Ross Zwisler
2018-05-17 19:32 ` Dan Williams
2018-05-17 19:56   ` Matthew Wilcox
2018-05-17 20:03     ` Dan Williams
2018-05-17 20:48       ` Ross Zwisler

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=96487ace-f807-5df5-49e1-a888ad26af3e@intel.com \
    --to=dave.jiang@intel.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=willy@infradead.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: 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).