diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2009-09-24 17:47:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 20:11:24 -0400 |
commit | e9ea0e2d1d00959b451dfc239df126d3c6a22043 (patch) | |
tree | 3dd9e8178a92fab0004b5bcbed568ed0ad92cfc9 /include/linux/hugetlb.h | |
parent | c44972f1782124f945ec8bea8a78f30f1a3538bd (diff) |
hugetlb_file_setup(): use C, not cpp
Why macros are always wrong:
mm/mmap.c: In function 'do_mmap_pgoff':
mm/mmap.c:953: warning: unused variable 'user'
also, move a couple of struct forward-decls outside `#ifdef
CONFIG_HUGETLB_PAGE' - it's pointless and frequently harmful to make these
conditional (eg, this patch needed `struct user_struct').
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 11ab19ac6b3d..16937995abd4 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -3,15 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
5 | 5 | ||
6 | struct ctl_table; | ||
7 | struct user_struct; | ||
8 | |||
6 | #ifdef CONFIG_HUGETLB_PAGE | 9 | #ifdef CONFIG_HUGETLB_PAGE |
7 | 10 | ||
8 | #include <linux/mempolicy.h> | 11 | #include <linux/mempolicy.h> |
9 | #include <linux/shm.h> | 12 | #include <linux/shm.h> |
10 | #include <asm/tlbflush.h> | 13 | #include <asm/tlbflush.h> |
11 | 14 | ||
12 | struct ctl_table; | ||
13 | struct user_struct; | ||
14 | |||
15 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
16 | 16 | ||
17 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 17 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
@@ -187,7 +187,11 @@ static inline void set_file_hugepages(struct file *file) | |||
187 | 187 | ||
188 | #define is_file_hugepages(file) 0 | 188 | #define is_file_hugepages(file) 0 |
189 | #define set_file_hugepages(file) BUG() | 189 | #define set_file_hugepages(file) BUG() |
190 | #define hugetlb_file_setup(name,size,acct,user,creat) ERR_PTR(-ENOSYS) | 190 | static inline struct file *hugetlb_file_setup(const char *name, size_t size, |
191 | int acctflag, struct user_struct **user, int creat_flags) | ||
192 | { | ||
193 | return ERR_PTR(-ENOSYS); | ||
194 | } | ||
191 | 195 | ||
192 | #endif /* !CONFIG_HUGETLBFS */ | 196 | #endif /* !CONFIG_HUGETLBFS */ |
193 | 197 | ||