summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/pagewalk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 90cc346a6ecf..a94c401ab2cf 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -313,7 +313,8 @@ static unsigned long hugetlb_entry_end(struct hstate *h, unsigned long addr,
unsigned long end)
{
unsigned long boundary = (addr & huge_page_mask(h)) + huge_page_size(h);
- return boundary < end ? boundary : end;
+
+ return min(boundary, end);
}
static int walk_hugetlb_range(unsigned long addr, unsigned long end,