Commit 753162cd authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Linus Torvalds

mm: hugetlb: fix type of hugetlb_treat_as_movable variable

hugetlb_treat_as_movable declared as unsigned long, but
proc_dointvec() used for parsing it:

static struct ctl_table vm_table[] = {
...
        {
                .procname	= "hugepages_treat_as_movable",
                .data		= &hugepages_treat_as_movable,
                .maxlen		= sizeof(int),
                .mode		= 0644,
                .proc_handler	= proc_dointvec,
        },

This seems harmless, but it's better to use int type here.
Signed-off-by: default avatarAndrey Ryabinin <a.ryabinin@samsung.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3cd7645d
...@@ -86,7 +86,7 @@ void free_huge_page(struct page *page); ...@@ -86,7 +86,7 @@ void free_huge_page(struct page *page);
pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud);
#endif #endif
extern unsigned long hugepages_treat_as_movable; extern int hugepages_treat_as_movable;
extern int sysctl_hugetlb_shm_group; extern int sysctl_hugetlb_shm_group;
extern struct list_head huge_boot_pages; extern struct list_head huge_boot_pages;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/node.h> #include <linux/node.h>
#include "internal.h" #include "internal.h"
unsigned long hugepages_treat_as_movable; int hugepages_treat_as_movable;
int hugetlb_max_hstate __read_mostly; int hugetlb_max_hstate __read_mostly;
unsigned int default_hstate_idx; unsigned int default_hstate_idx;
......
Markdown is supported
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