aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-04-08 18:15:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-17 12:52:25 -0400
commite35d49f637d5ce3d7bb6c735a8d18727e3101f9d (patch)
tree4816fe32db98e29163d122b20efd6ce47581c4f8
parentac565de31c950723539af55542c7507bc1faa60a (diff)
open: move compat syscalls from compat.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/compat.c18
-rw-r--r--fs/open.c20
2 files changed, 20 insertions, 18 deletions
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,
311 return retval; 311 return retval;
312} 312}
313 313
314/*
315 * Exactly like fs/open.c:sys_open(), except that it doesn't set the
316 * O_LARGEFILE flag.
317 */
318COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
319{
320 return do_sys_open(AT_FDCWD, filename, flags, mode);
321}
322
323/*
324 * Exactly like fs/open.c:sys_openat(), except that it doesn't set the
325 * O_LARGEFILE flag.
326 */
327COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode)
328{
329 return do_sys_open(dfd, filename, flags, mode);
330}
331
332#ifdef CONFIG_FHANDLE 314#ifdef CONFIG_FHANDLE
333/* 315/*
334 * Exactly like fs/open.c:sys_open_by_handle_at(), except that it 316 * 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,
1078 return do_sys_open(dfd, filename, flags, mode); 1078 return do_sys_open(dfd, filename, flags, mode);
1079} 1079}
1080 1080
1081#ifdef CONFIG_COMPAT
1082/*
1083 * Exactly like sys_open(), except that it doesn't set the
1084 * O_LARGEFILE flag.
1085 */
1086COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
1087{
1088 return do_sys_open(AT_FDCWD, filename, flags, mode);
1089}
1090
1091/*
1092 * Exactly like sys_openat(), except that it doesn't set the
1093 * O_LARGEFILE flag.
1094 */
1095COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode)
1096{
1097 return do_sys_open(dfd, filename, flags, mode);
1098}
1099#endif
1100
1081#ifndef __alpha__ 1101#ifndef __alpha__
1082 1102
1083/* 1103/*