linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jane Chu <jane.chu@oracle.com>
Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com,
	dave.jiang@intel.com, ira.weiny@intel.com,
	viro@zeniv.linux.org.uk, brauner@kernel.org,
	nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] dax: enable dax fault handler to report VM_FAULT_HWPOISON
Date: Thu, 6 Apr 2023 20:32:38 +0100	[thread overview]
Message-ID: <ZC8eVmF7YdBsDmc4@casper.infradead.org> (raw)
In-Reply-To: <20230406175556.452442-1-jane.chu@oracle.com>

On Thu, Apr 06, 2023 at 11:55:56AM -0600, Jane Chu wrote:
>  static vm_fault_t dax_fault_return(int error)
>  {
>  	if (error == 0)
>  		return VM_FAULT_NOPAGE;
> -	return vmf_error(error);
> +	else if (error == -ENOMEM)
> +		return VM_FAULT_OOM;
> +	else if (error == -EHWPOISON)
> +		return VM_FAULT_HWPOISON;
> +	return VM_FAULT_SIGBUS;
>  }

Why would we want to handle it here instead of changing vmf_error()?

  reply	other threads:[~2023-04-06 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 17:55 [PATCH] dax: enable dax fault handler to report VM_FAULT_HWPOISON Jane Chu
2023-04-06 19:32 ` Matthew Wilcox [this message]
2023-04-06 20:38   ` Jane Chu

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=ZC8eVmF7YdBsDmc4@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=brauner@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --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).