mm/gup: Optimise compound_range_next()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 9 Jan 2022 21:21:23 +0000 (16:21 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 17 Feb 2022 22:05:51 +0000 (17:05 -0500)
commit9d4118dd7e4233fbd49de81d8aa4a1a14290ff85
treea6d22a8de509a34b011b80253580339de2519662
parent6522f8efb638dc507854bed7e16ff7185d7e58eb
mm/gup: Optimise compound_range_next()

By definition, a compound page has an order >= 1, so the second half
of the test was redundant.  Also, this cannot be a tail page since
it's the result of calling compound_head(), so use PageHead() instead
of PageCompound().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
mm/gup.c