summaryrefslogtreecommitdiff
path: root/fs/open.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-06 16:03:21 +0300
committerChristoph Hellwig <hch@lst.de>2020-07-31 09:16:00 +0300
commit166e07c37c6417c9713666268fc0eb89a9ce48b9 (patch)
tree05d5de0b6423e67d1ed8dd664c82c2d97c8faecb /fs/open.c
parentfb2da16cd70a5140acdd7a102e5cd3b697c3404f (diff)
downloadlinux-166e07c37c6417c9713666268fc0eb89a9ce48b9.tar.xz
fs: remove ksys_open
Just open code it in the two callers. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c
index 75166f071d28..ab3671af8a97 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1208,7 +1208,9 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
- return ksys_open(filename, flags, mode);
+ if (force_o_largefile())
+ flags |= O_LARGEFILE;
+ return do_sys_open(AT_FDCWD, filename, flags, mode);
}
SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
@@ -1270,9 +1272,12 @@ COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, fla
*/
SYSCALL_DEFINE2(creat, const char __user *, pathname, umode_t, mode)
{
- return ksys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);
-}
+ int flags = O_CREAT | O_WRONLY | O_TRUNC;
+ if (force_o_largefile())
+ flags |= O_LARGEFILE;
+ return do_sys_open(AT_FDCWD, pathname, flags, mode);
+}
#endif
/*