From c033a93c0d961fc7ec5b0872649143e061d97dd4 Mon Sep 17 00:00:00 2001 From: Petr Holasek Date: Tue, 22 Mar 2011 16:33:05 -0700 Subject: [PATCH] hugetlbfs: correct handling of negative input to /proc/sys/vm/nr_hugepages When the user inserts a negative value into /proc/sys/vm/nr_hugepages it will cause the kernel to allocate as many hugepages as possible and to then update /proc/meminfo to reflect this. This changes the behavior so that the negative input will result in nr_hugepages value being unchanged. Signed-off-by: Petr Holasek Signed-off-by: Anton Arapov Reviewed-by: Naoya Horiguchi Acked-by: David Rientjes Acked-by: Mel Gorman Acked-by: Eric B Munson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed