aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-03-27 02:43:39 -0400
committerIngo Molnar <mingo@kernel.org>2018-03-27 02:43:39 -0400
commit0bc91d4ba77156ae9217d25ed7c434540f950d05 (patch)
tree949c1acf27b106184d8842586740fbbcc9c9ea62 /mm/hugetlb.c
parent565977a3d929fc4427769117a8ac976ec16776d5 (diff)
parent3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff)
Merge tag 'v4.16-rc7' into x86/mm, to fix up conflict
Conflicts: arch/x86/mm/init_64.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a963f2034dfc..976bbc5646fe 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -18,6 +18,7 @@
18#include <linux/bootmem.h> 18#include <linux/bootmem.h>
19#include <linux/sysfs.h> 19#include <linux/sysfs.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/mmdebug.h>
21#include <linux/sched/signal.h> 22#include <linux/sched/signal.h>
22#include <linux/rmap.h> 23#include <linux/rmap.h>
23#include <linux/string_helpers.h> 24#include <linux/string_helpers.h>
@@ -4374,6 +4375,12 @@ int hugetlb_reserve_pages(struct inode *inode,
4374 struct resv_map *resv_map; 4375 struct resv_map *resv_map;
4375 long gbl_reserve; 4376 long gbl_reserve;
4376 4377
4378 /* This should never happen */
4379 if (from > to) {
4380 VM_WARN(1, "%s called with a negative range\n", __func__);
4381 return -EINVAL;
4382 }
4383
4377 /* 4384 /*
4378 * Only apply hugepage reservation if asked. At fault time, an 4385 * Only apply hugepage reservation if asked. At fault time, an
4379 * attempt will be made for VM_NORESERVE to allocate a page 4386 * attempt will be made for VM_NORESERVE to allocate a page