diff --git a/mm/gup.c b/mm/gup.c index 26c73998c6df..75a0a1fd4c2a 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -262,7 +262,7 @@ static inline struct page *compound_range_next(struct page *start, next = start + i; page = compound_head(next); - if (PageCompound(page) && compound_order(page) >= 1) + if (PageHead(page)) nr = min_t(unsigned int, page + compound_nr(page) - next, npages - i);