diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -933,16 +933,11 @@ void fastcall fd_install(unsigned int fd, struct file * file) | |||
933 | 933 | ||
934 | EXPORT_SYMBOL(fd_install); | 934 | EXPORT_SYMBOL(fd_install); |
935 | 935 | ||
936 | asmlinkage long sys_open(const char __user * filename, int flags, int mode) | 936 | long do_sys_open(const char __user *filename, int flags, int mode) |
937 | { | 937 | { |
938 | char * tmp; | 938 | char *tmp = getname(filename); |
939 | int fd; | 939 | int fd = PTR_ERR(tmp); |
940 | 940 | ||
941 | if (force_o_largefile()) | ||
942 | flags |= O_LARGEFILE; | ||
943 | |||
944 | tmp = getname(filename); | ||
945 | fd = PTR_ERR(tmp); | ||
946 | if (!IS_ERR(tmp)) { | 941 | if (!IS_ERR(tmp)) { |
947 | fd = get_unused_fd(); | 942 | fd = get_unused_fd(); |
948 | if (fd >= 0) { | 943 | if (fd >= 0) { |
@@ -959,6 +954,14 @@ asmlinkage long sys_open(const char __user * filename, int flags, int mode) | |||
959 | } | 954 | } |
960 | return fd; | 955 | return fd; |
961 | } | 956 | } |
957 | |||
958 | asmlinkage long sys_open(const char __user *filename, int flags, int mode) | ||
959 | { | ||
960 | if (force_o_largefile()) | ||
961 | flags |= O_LARGEFILE; | ||
962 | |||
963 | return do_sys_open(filename, flags, mode); | ||
964 | } | ||
962 | EXPORT_SYMBOL_GPL(sys_open); | 965 | EXPORT_SYMBOL_GPL(sys_open); |
963 | 966 | ||
964 | #ifndef __alpha__ | 967 | #ifndef __alpha__ |