linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "yaoaili [么爱利]" <yaoaili@kingsoft.com>
Cc: "naoya.horiguchi@nec.com" <naoya.horiguchi@nec.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"YANGFENG1 [杨峰]" <YANGFENG1@kingsoft.com>
Subject: Re: [PATCH] fix incorrect compound page flags store
Date: Wed, 2 Sep 2020 12:35:00 +0100	[thread overview]
Message-ID: <20200902113500.GW14765@casper.infradead.org> (raw)
In-Reply-To: <de0ad1d3c5ce4bb8820e93a1c6b5aa82@kingsoft.com>

On Wed, Sep 02, 2020 at 11:24:59AM +0000, yaoaili [么爱利] wrote:
> PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.

You're missing a Signed-off-by line.

Your analysis is correct; PageHuge was tested for a few dozen lines
higher, and we ran off to a different function.

Ad far as I understand this function, this looks right to me.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index f1aa6433f404..e6995976b11d 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
>          * page_remove_rmap() in try_to_unmap_one(). So to determine page status
>          * correctly, we save a copy of the page flags at this time.
>          */
> -       if (PageHuge(p))
> +       if (PageCompound(p))
>                 page_flags = hpage->flags;
>         else
>                 page_flags = p->flags;
> --
> 2.25.1


  reply	other threads:[~2020-09-02 11:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 11:24 yaoaili [么爱利]
2020-09-02 11:35 ` Matthew Wilcox [this message]
2020-09-02 11:46   ` 答复: " yaoaili [么爱利]
2020-09-04  2:26     ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  3:44 [PATCH] Fix " yaoaili126
2020-09-08  7:02 ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  7:18   ` yaoaili [么爱利]
2020-09-08  7:26   ` Oscar Salvador
2020-09-08  8:02     ` yaoaili [么爱利]
2020-09-08  8:09       ` Oscar Salvador
2020-09-08  8:36     ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  8:48       ` yaoaili [么爱利]
2020-09-08  9:00         ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  9:10           ` yaoaili [么爱利]
2020-09-08  8:51       ` Oscar Salvador
2020-09-08  9:05         ` HORIGUCHI NAOYA(堀口 直也)
2020-09-18  9:35           ` Oscar Salvador
2020-09-25  1:18             ` HORIGUCHI NAOYA(堀口 直也)
2020-09-25  1:55               ` yaoaili [么爱利]
2020-09-25  4:35                 ` HORIGUCHI NAOYA(堀口 直也)
2020-09-25  5:52                   ` yaoaili [么爱利]

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=20200902113500.GW14765@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=YANGFENG1@kingsoft.com \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=yaoaili@kingsoft.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