From: Al Viro Date: Sat, 8 Apr 2017 22:15:12 +0000 (-0400) Subject: open: move compat syscalls from compat.c X-Git-Tag: v4.12-rc1~131^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e35d49f637d5ce3d7bb6c735a8d18727e3101f9d;p=karo-tx-linux.git open: move compat syscalls from compat.c Signed-off-by: Al Viro --- diff --git a/fs/compat.c b/fs/compat.c index e24a76497dd4..e1822ec8a87c 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -311,24 +311,6 @@ COMPAT_SYSCALL_DEFINE5(mount, const char __user *, dev_name, return retval; } -/* - * Exactly like fs/open.c:sys_open(), except that it doesn't set the - * O_LARGEFILE flag. - */ -COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) -{ - return do_sys_open(AT_FDCWD, filename, flags, mode); -} - -/* - * Exactly like fs/open.c:sys_openat(), except that it doesn't set the - * O_LARGEFILE flag. - */ -COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode) -{ - return do_sys_open(dfd, filename, flags, mode); -} - #ifdef CONFIG_FHANDLE /* * Exactly like fs/open.c:sys_open_by_handle_at(), except that it diff --git a/fs/open.c b/fs/open.c index 949cef29c3bb..4d23f729dcc6 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1078,6 +1078,26 @@ SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, return do_sys_open(dfd, filename, flags, mode); } +#ifdef CONFIG_COMPAT +/* + * Exactly like sys_open(), except that it doesn't set the + * O_LARGEFILE flag. + */ +COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) +{ + return do_sys_open(AT_FDCWD, filename, flags, mode); +} + +/* + * Exactly like sys_openat(), except that it doesn't set the + * O_LARGEFILE flag. + */ +COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode) +{ + return do_sys_open(dfd, filename, flags, mode); +} +#endif + #ifndef __alpha__ /*