On Mon, Sep 07, 2020 at 08:44:42PM -0700, yaoaili126@xxxxxxx wrote: > From: Aili Yao <yaoaili@xxxxxxxxxxxx> > > PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value. > > Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > Signed-off-by: Yang Feng < yangfeng1@xxxxxxxxxxxx> > Signed-off-by: Aili Yao <yaoaili@xxxxxxxxxxxx> I found that this PageHuge() check is removed and no long exists in the latest mmotm, so we don't have worry about it. Sorry for missing it in my previous review. Thanks, Naoya Horiguchi > --- > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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.18.4 > >