Skip to content
Commit c033a93c authored by Petr Holasek's avatar Petr Holasek Committed by Linus Torvalds
Browse files

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: default avatarPetr Holasek <pholasek@redhat.com>
Signed-off-by: default avatarAnton Arapov <anton@redhat.com>
Reviewed-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
Acked-by: default avatarEric B Munson <emunson@mgebm.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8afdcece
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment