mm: introduce compound_nr()
Replace 1 << compound_order(page) with compound_nr(page). Minor improvements in readability. Link: http://lkml.kernel.org/r/20190721104612.19120-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
94ad933810
commit
d8c6546b1a
2
mm/gup.c
2
mm/gup.c
@@ -1460,7 +1460,7 @@ check_again:
|
||||
* gup may start from a tail page. Advance step by the left
|
||||
* part.
|
||||
*/
|
||||
step = (1 << compound_order(head)) - (pages[i] - head);
|
||||
step = compound_nr(head) - (pages[i] - head);
|
||||
/*
|
||||
* If we get a page from the CMA zone, since we are going to
|
||||
* be pinning these entries, we might as well move them out
|
||||
|
Reference in New Issue
Block a user