lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6deed9a0-a1fc-161d-b6f7-b1116212fbde@redhat.com>
Date:   Mon, 9 Aug 2021 11:22:19 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, akpm@...ux-foundation.org
Cc:     imbrenda@...ux.ibm.com, kirill.shutemov@...ux.intel.com,
        jack@...e.cz, jhubbard@...dia.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] mm: gup: remove unneed local variable orig_refs

On 07.08.21 11:36, Miaohe Lin wrote:
> Remove unneed local variable orig_refs since refs is unchanged now.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>   mm/gup.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 430495cb1b91..d6056dcab02c 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -117,8 +117,6 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page,
>   	if (flags & FOLL_GET)
>   		return try_get_compound_head(page, refs);
>   	else if (flags & FOLL_PIN) {
> -		int orig_refs = refs;
> -
>   		/*
>   		 * Can't do FOLL_LONGTERM + FOLL_PIN gup fast path if not in a
>   		 * right zone, so fail and let the caller fall back to the slow
> @@ -150,7 +148,7 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page,
>   			page_ref_add(page, refs * (GUP_PIN_COUNTING_BIAS - 1));
>   
>   		mod_node_page_state(page_pgdat(page), NR_FOLL_PIN_ACQUIRED,
> -				    orig_refs);
> +				    refs);
>   
>   		return page;
>   	}
> 

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ