From e92866fdb6c6276fa4c629346f8f92cf919f1540 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 26 Jun 2013 14:45:07 +0200 Subject: [PATCH] mars: generic pre-patch for mars Mostly introduces missing EXPORT_SYMBOL(). Should have exactly zero impact onto the kernel. This is the generic version which exports all sys_*() system calls. This should not introduce any additional maintenance pain because that interfaces has to be stable anyway due to POSIX etc. Conflicts: include/linux/syscalls.h --- fs/open.c | 1 - fs/utimes.c | 2 ++ include/linux/syscalls.h | 3 +++ include/uapi/linux/major.h | 1 + mm/page_alloc.c | 3 +++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 9d64679..5d7c5bd 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1058,7 +1058,6 @@ SYSCALL_DEFINE1(close, unsigned int, fd) return retval; } -EXPORT_SYMBOL(sys_close); /* * This routine simulates a hangup on the tty, to arrange that users diff --git a/fs/utimes.c b/fs/utimes.c index aa138d6..4a1f4a8 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -181,6 +182,7 @@ retry: out: return error; } +EXPORT_SYMBOL(do_utimes); SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, struct timespec __user *, utimes, int, flags) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a4a0588..8b852a4 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -75,6 +75,7 @@ struct sigaltstack; #include #include #include +#include #include #include #include @@ -176,6 +177,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; #define SYSCALL_DEFINE0(sname) \ SYSCALL_METADATA(_##sname, 0); \ + EXPORT_SYMBOL(sys_##sname); \ asmlinkage long sys_##sname(void) #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) @@ -202,6 +204,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ return ret; \ } \ + EXPORT_SYMBOL(sys##name); \ static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special, diff --git a/include/uapi/linux/major.h b/include/uapi/linux/major.h index 620252e..61a665c 100644 --- a/include/uapi/linux/major.h +++ b/include/uapi/linux/major.h @@ -148,6 +148,7 @@ #define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT) #define DRBD_MAJOR 147 +#define MARS_MAJOR 148 #define RTF_MAJOR 150 #define RAW_MAJOR 162 diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5dba293..7f2716e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -207,6 +207,8 @@ static char * const zone_names[MAX_NR_ZONES] = { int min_free_kbytes = 1024; int user_min_free_kbytes = -1; +EXPORT_SYMBOL(min_free_kbytes); + static unsigned long __meminitdata nr_kernel_pages; static unsigned long __meminitdata nr_all_pages; static unsigned long __meminitdata dma_reserve; @@ -5661,6 +5663,7 @@ static void __setup_per_zone_wmarks(void) /* update totalreserve_pages */ calculate_totalreserve_pages(); } +EXPORT_SYMBOL(setup_per_zone_wmarks); /** * setup_per_zone_wmarks - called when min_free_kbytes changes -- 1.9.3