Re: [RFC PATCH 3/6] mm, pgtable: Add ownership for the PTE table

From: Chih-En Lin
Date: Sat May 21 2022 - 00:04:37 EST


On Fri, May 20, 2022 at 02:15:12PM +0000, Christophe Leroy wrote:
> > +static inline bool cow_pte_owner_is_same(pmd_t *pmd, pmd_t *owner)
> > +{
> > + return (smp_load_acquire(&pmd_page(*pmd)->cow_pte_owner) == owner) ?
> > + true : false;

Why I wrote like this. ;-)

>
> The above seems uggly, the following should be equivalent :
>
> return smp_load_acquire(&pmd_page(*pmd)->cow_pte_owner) == owner;
>

Thanks.