Re: [PATCH v3 13/14] mm/gup: grab head page refcount once for group of subpages

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

 



On Wed, Aug 25, 2021 at 08:10:39PM +0100, Joao Martins wrote:
> @@ -2273,8 +2273,7 @@ static int __gup_device_huge(unsigned long pfn, unsigned long addr,
>                 refs = record_subpages(page, addr, next, pages + *nr);
> 
>                 SetPageReferenced(head);
> -               pinned_head = try_grab_compound_head(head, refs, flags);
> -               if (unlikely(!pinned_head)) {
> +               if (unlikely(!try_grab_compound_head(head, refs, flags))) {
>                         if (PageCompound(head))

BTW, you can just check PageHead(head).  We know it can't be PageTail ...




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux