Skip to content

Commit

Permalink
mm: gup: remove unneed local variable orig_refs
Browse files Browse the repository at this point in the history
Remove unneed local variable orig_refs since refs is unchanged now.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Reviewed-by: Claudio Imbrenda <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
MiaoheLin authored and torvalds committed Sep 3, 2021
1 parent 8fed2f3 commit 0fef147
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0fef147

Please sign in to comment.