On Thu, May 20, 2021 at 01:05:15PM -0500, Brijesh Singh wrote: > Maybe I am missing something, the statement above was executed for > either set or clr but the page shared need to happen only for clr. So, > from code readability point I kept it outside of that if(). > > Otherwise we may have to do something like. > > ... > > if ((set | clr) & _PAGE_EN) { > > if (clr) > > snp_set_page_shared(pte_pfn(*ptep) << PAGE_SHIFT); > > } > > I am okay with above is the preferred approach. Yes pls, because it keeps the _PAGE_ENC handling together in one statement. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette