mirror of https://github.com/schoebel/mars
173 lines
5.2 KiB
Diff
173 lines
5.2 KiB
Diff
From 26df83dc7dd3bc7ef446bf49f3b398f5e2165ad0 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Schoebel-Theuer <tst@1und1.de>
|
|
Date: Thu, 30 Jan 2020 12:16:02 +0100
|
|
Subject: [PATCH] mars: minimum pre-patch for mars
|
|
|
|
Mostly introduces some EXPORT_SYMBOL().
|
|
Should have almost no impact onto the kernel.
|
|
---
|
|
fs/aio.c | 6 ++++++
|
|
fs/namei.c | 5 +++++
|
|
fs/open.c | 2 ++
|
|
fs/utimes.c | 2 ++
|
|
include/linux/aio.h | 1 +
|
|
include/uapi/linux/major.h | 1 +
|
|
mm/page_alloc.c | 2 ++
|
|
7 files changed, 19 insertions(+)
|
|
|
|
diff --git a/fs/aio.c b/fs/aio.c
|
|
index 9798d4edfd8f..5ac48388b052 100644
|
|
--- a/fs/aio.c
|
|
+++ b/fs/aio.c
|
|
@@ -114,6 +114,7 @@ struct kioctx {
|
|
static DEFINE_SPINLOCK(aio_nr_lock);
|
|
unsigned long aio_nr; /* current system wide number of aio requests */
|
|
unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */
|
|
+EXPORT_SYMBOL_GPL(aio_max_nr);
|
|
/*----end sysctl variables---*/
|
|
|
|
static struct kmem_cache *kiocb_cachep;
|
|
@@ -861,6 +862,7 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
|
|
out:
|
|
return ret;
|
|
}
|
|
+EXPORT_SYMBOL(sys_io_setup);
|
|
|
|
/* sys_io_destroy:
|
|
* Destroy the aio_context specified. May cancel any outstanding
|
|
@@ -879,6 +881,7 @@ SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
|
|
pr_debug("EINVAL: io_destroy: invalid context id\n");
|
|
return -EINVAL;
|
|
}
|
|
+EXPORT_SYMBOL(sys_io_destroy);
|
|
|
|
static void aio_advance_iovec(struct kiocb *iocb, ssize_t ret)
|
|
{
|
|
@@ -1203,6 +1206,7 @@ long do_io_submit(aio_context_t ctx_id, long nr,
|
|
put_ioctx(ctx);
|
|
return i ? i : ret;
|
|
}
|
|
+EXPORT_SYMBOL(sys_io_submit);
|
|
|
|
/* sys_io_submit:
|
|
* Queue the nr iocbs pointed to by iocbpp for processing. Returns
|
|
@@ -1293,6 +1297,7 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb,
|
|
|
|
return ret;
|
|
}
|
|
+EXPORT_SYMBOL(sys_io_cancel);
|
|
|
|
/* io_getevents:
|
|
* Attempts to read at least min_nr events and up to nr events from
|
|
@@ -1322,3 +1327,4 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
|
|
}
|
|
return ret;
|
|
}
|
|
+EXPORT_SYMBOL(sys_io_getevents);
|
|
diff --git a/fs/namei.c b/fs/namei.c
|
|
index c87e15ee9255..03fb16b6386f 100644
|
|
--- a/fs/namei.c
|
|
+++ b/fs/namei.c
|
|
@@ -4124,12 +4124,17 @@ EXPORT_SYMBOL(vfs_create);
|
|
EXPORT_SYMBOL(vfs_follow_link);
|
|
EXPORT_SYMBOL(vfs_link);
|
|
EXPORT_SYMBOL(vfs_mkdir);
|
|
+EXPORT_SYMBOL(sys_mkdir);
|
|
EXPORT_SYMBOL(vfs_mknod);
|
|
EXPORT_SYMBOL(generic_permission);
|
|
EXPORT_SYMBOL(vfs_readlink);
|
|
EXPORT_SYMBOL(vfs_rename);
|
|
+EXPORT_SYMBOL(sys_rename);
|
|
EXPORT_SYMBOL(vfs_rmdir);
|
|
+EXPORT_SYMBOL(sys_rmdir);
|
|
EXPORT_SYMBOL(vfs_symlink);
|
|
+EXPORT_SYMBOL(sys_symlink);
|
|
EXPORT_SYMBOL(vfs_unlink);
|
|
+EXPORT_SYMBOL(sys_unlink);
|
|
EXPORT_SYMBOL(dentry_unhash);
|
|
EXPORT_SYMBOL(generic_readlink);
|
|
diff --git a/fs/open.c b/fs/open.c
|
|
index 5f129683b7d7..26baee9d31fc 100644
|
|
--- a/fs/open.c
|
|
+++ b/fs/open.c
|
|
@@ -519,6 +519,7 @@ SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode)
|
|
{
|
|
return sys_fchmodat(AT_FDCWD, filename, mode);
|
|
}
|
|
+EXPORT_SYMBOL(sys_chmod);
|
|
|
|
static int chown_common(struct path *path, uid_t user, gid_t group)
|
|
{
|
|
@@ -598,6 +599,7 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group
|
|
return sys_fchownat(AT_FDCWD, filename, user, group,
|
|
AT_SYMLINK_NOFOLLOW);
|
|
}
|
|
+EXPORT_SYMBOL(sys_lchown);
|
|
|
|
SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
|
|
{
|
|
diff --git a/fs/utimes.c b/fs/utimes.c
|
|
index f4fb7eca10e8..6afbba82f6eb 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>
|
|
@@ -174,6 +175,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/aio.h b/include/linux/aio.h
|
|
index 1bdf965339f9..1f4bbb69e1ba 100644
|
|
--- a/include/linux/aio.h
|
|
+++ b/include/linux/aio.h
|
|
@@ -83,6 +83,7 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
|
|
|
|
/* prototypes */
|
|
#ifdef CONFIG_AIO
|
|
+#define HAS_AIO_MAX
|
|
extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
|
|
extern void aio_put_req(struct kiocb *iocb);
|
|
extern void aio_complete(struct kiocb *iocb, long res, long res2);
|
|
diff --git a/include/uapi/linux/major.h b/include/uapi/linux/major.h
|
|
index 6a8ca98c9a96..faf6692896dd 100644
|
|
--- a/include/uapi/linux/major.h
|
|
+++ b/include/uapi/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/mm/page_alloc.c b/mm/page_alloc.c
|
|
index 829ee76d5521..c0b62985649c 100644
|
|
--- a/mm/page_alloc.c
|
|
+++ b/mm/page_alloc.c
|
|
@@ -197,6 +197,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;
|
|
@@ -5382,6 +5383,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
|
|
--
|
|
2.25.0
|
|
|