diff options
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 38805f3447ea..f9df17dcec1c 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1057,4 +1057,15 @@ static inline int ksys_close(unsigned int fd) return __close_fd(current->files, fd); } +extern long do_sys_open(int dfd, const char __user *filename, int flags, + umode_t mode); + +static inline long ksys_open(const char __user *filename, int flags, + umode_t mode) +{ + if (force_o_largefile()) + flags |= O_LARGEFILE; + return do_sys_open(AT_FDCWD, filename, flags, mode); +} + #endif |