mirror of https://github.com/schoebel/mars
125 lines
3.8 KiB
Diff
125 lines
3.8 KiB
Diff
From a0772be796233af9a8d541b319b438208b87bcc3 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Schoebel-Theuer <schoebel@bell.site>
|
|
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.
|
|
---
|
|
fs/open.c | 1 -
|
|
fs/utimes.c | 2 ++
|
|
include/linux/major.h | 1 +
|
|
include/linux/syscalls.h | 4 ++++
|
|
mm/page_alloc.c | 2 ++
|
|
mm/swap_state.c | 1 +
|
|
6 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/fs/open.c b/fs/open.c
|
|
index e1f2cdb..72a5f24 100644
|
|
--- a/fs/open.c
|
|
+++ b/fs/open.c
|
|
@@ -1069,7 +1069,6 @@ out_unlock:
|
|
spin_unlock(&files->file_lock);
|
|
return -EBADF;
|
|
}
|
|
-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 fa4dbe4..d750e6d 100644
|
|
--- a/fs/utimes.c
|
|
+++ b/fs/utimes.c
|
|
@@ -1,3 +1,4 @@
|
|
+#include <linux/module.h>
|
|
#include <linux/compiler.h>
|
|
#include <linux/file.h>
|
|
#include <linux/fs.h>
|
|
@@ -171,6 +172,7 @@ long do_utimes(int dfd, const char __user *filename, struct timespec *times,
|
|
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/major.h b/include/linux/major.h
|
|
index 6a8ca98..faf6692 100644
|
|
--- a/include/linux/major.h
|
|
+++ b/include/linux/major.h
|
|
@@ -146,6 +146,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/include/linux/syscalls.h b/include/linux/syscalls.h
|
|
index 19439c7..9fb5044 100644
|
|
--- a/include/linux/syscalls.h
|
|
+++ b/include/linux/syscalls.h
|
|
@@ -73,6 +73,7 @@ struct file_handle;
|
|
#include <asm/siginfo.h>
|
|
#include <asm/signal.h>
|
|
#include <linux/unistd.h>
|
|
+#include <linux/export.h>
|
|
#include <linux/quota.h>
|
|
#include <linux/key.h>
|
|
#include <trace/syscall.h>
|
|
@@ -241,12 +242,15 @@ extern struct trace_event_functions exit_syscall_print_funcs;
|
|
return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \
|
|
} \
|
|
SYSCALL_ALIAS(sys##name, SyS##name); \
|
|
+ EXPORT_SYMBOL(sys##name); \
|
|
static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))
|
|
|
|
#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
|
|
|
|
#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
|
|
#define __SYSCALL_DEFINEx(x, name, ...) \
|
|
+ asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \
|
|
+ EXPORT_SYMBOL(sys##name); \
|
|
asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
|
|
|
|
#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
|
|
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
|
index d2d8f54..152b57e 100644
|
|
--- a/mm/page_alloc.c
|
|
+++ b/mm/page_alloc.c
|
|
@@ -192,6 +192,7 @@ static char * const zone_names[MAX_NR_ZONES] = {
|
|
};
|
|
|
|
int min_free_kbytes = 1024;
|
|
+EXPORT_SYMBOL(min_free_kbytes);
|
|
|
|
static unsigned long __meminitdata nr_kernel_pages;
|
|
static unsigned long __meminitdata nr_all_pages;
|
|
@@ -5135,6 +5136,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
|
|
diff --git a/mm/swap_state.c b/mm/swap_state.c
|
|
index 0cb36fb..e4d5a82 100644
|
|
--- a/mm/swap_state.c
|
|
+++ b/mm/swap_state.c
|
|
@@ -43,6 +43,7 @@ struct address_space swapper_space = {
|
|
.i_mmap_nonlinear = LIST_HEAD_INIT(swapper_space.i_mmap_nonlinear),
|
|
.backing_dev_info = &swap_backing_dev_info,
|
|
};
|
|
+EXPORT_SYMBOL(swapper_space);
|
|
|
|
#define INC_CACHE_INFO(x) do { swap_cache_info.x++; } while (0)
|
|
|
|
--
|
|
1.9.3
|
|
|