Re: [PATCH v2] mm/memory: Don't require head page for do_set_pmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 11 Jun 2024 19:03:29 +0100 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> On Tue, Jun 11, 2024 at 08:32:16AM -0700, Andrew Bresticker wrote:
> > -	if (page != &folio->page || folio_order(folio) != HPAGE_PMD_ORDER)
> > +	if (folio_order(folio) != HPAGE_PMD_ORDER)
> >  		return ret;
> > +	page = &folio->page;
> 
> This works today, but in about six months time it's going to be a pain.
> 
> +	page = folio_page(folio, 0);
> 
> is the one which works today and in the future.

I was wondering about that.

hp2:/usr/src/25> fgrep "&folio->page" mm/*.c | wc -l
84
hp2:/usr/src/25> fgrep "folio_page(" mm/*.c | wc -l 
35

Should these all be converted?  What's the general rule here?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux