mm: Fix build error with !CONFIG_HUGETLBFS
PATCH 1/1 mm: Fix build error with !CONFIG_HUGETLBFS
In commit 5a6fe1259506 an extra parameter was added to hugetlb_file_setup(), but the header file was not updated for the !CONFIG_HUGETLBFS case, which results in:
ipc/shm.c:371:49: error: macro "hugetlb_file_setup" passed 3 arguments,
but takes just 2
include/linux/hugetlb.h +3 -3
@@ -159,9 +159,9 @@ static inline void set_file_hugepages(struct file *file) }#else /* !CONFIG_HUGETLBFS */ -#define is_file_hugepages (file) 0 -#define set_file_hugepages (file) BUG() -#define hugetlb_file_setup (name,size) ERR_PTR(-ENOSYS) +#define is_file_hugepages (file) 0 +#define set_file_hugepages (file) BUG() +#define hugetlb_file_setup (name,size,int) ERR_PTR(-ENOSYS)#endif /* !CONFIG_HUGETLBFS */
Quoted 15 lines · Frans Pop
In commit
5a6fe1259506an extra parameter was added tohugetlb_file_setup(), but the header file was not updated for the !CONFIG_HUGETLBFS case, which results in:
ipc/shm.c:371:49: error: macro "hugetlb_file_setup" passed 3 arguments,
but takes just 2Signed-off-by Frans Pop <[email protected]>Cc Mel Gorman <[email protected]>include/linux/hugetlb.h +0
-0
include/linux/hugetlb.h static inline void set_file_hugepages(struct · line 165
Quoted 10 lines
include/linux/hugetlb.h +3
-3@@ -159,9 +159,9 @@ static inline void set_file_hugepages(struct file *file) }#else /* !CONFIG_HUGETLBFS */ -#define is_file_hugepages (file) 0 -#define set_file_hugepages (file) BUG() -#define hugetlb_file_setup (name,size) ERR_PTR(-ENOSYS) +#define is_file_hugepages (file) 0 +#define set_file_hugepages (file) BUG() +#define hugetlb_file_setup (name,size,int) ERR_PTR(-ENOSYS)
might be slightly better as:
#define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS)
otherwise ack.
- k
Quoted 5 lines · Kumar Gala
might be slightly better as:
#define
hugetlb_file_setup(name,size,acctflag)ERR_PTR(-ENOSYS)otherwise ack.
Yes, I see. Better to take the patch from Stefan Richter then:
http://lkml.org/lkml/2009/2/10/396