aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/ia32
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2005-09-06 18:18:25 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:43 -0400
commite922efc342d565a38eed3af377ff403f52148864 (patch)
treeb9996a96ed1bbb6e387f7ba8216f8e43ca640398 /arch/x86_64/ia32
parentab8d11beb46f0bd0617e04205c01f5c1fe845b61 (diff)
[PATCH] remove duplicated sys_open32() code from 64bit archs
64 bit architectures all implement their own compatibility sys_open(), when in fact the difference is simply not forcing the O_LARGEFILE flag. So use the a common function instead. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Cc: <viro@parcelfarce.linux.theplanet.co.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/ia32')
-rw-r--r--arch/x86_64/ia32/ia32entry.S2
-rw-r--r--arch/x86_64/ia32/sys_ia32.c26
2 files changed, 1 insertions, 27 deletions
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S
index c45d6a05b984..f174083d5567 100644
--- a/arch/x86_64/ia32/ia32entry.S
+++ b/arch/x86_64/ia32/ia32entry.S
@@ -307,7 +307,7 @@ ia32_sys_call_table:
307 .quad stub32_fork 307 .quad stub32_fork
308 .quad sys_read 308 .quad sys_read
309 .quad sys_write 309 .quad sys_write
310 .quad sys32_open /* 5 */ 310 .quad compat_sys_open /* 5 */
311 .quad sys_close 311 .quad sys_close
312 .quad sys32_waitpid 312 .quad sys32_waitpid
313 .quad sys_creat 313 .quad sys_creat
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index be996d1b691e..04d80406ce4f 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -969,32 +969,6 @@ long sys32_kill(int pid, int sig)
969 return sys_kill(pid, sig); 969 return sys_kill(pid, sig);
970} 970}
971 971
972asmlinkage long sys32_open(const char __user * filename, int flags, int mode)
973{
974 char * tmp;
975 int fd, error;
976
977 /* don't force O_LARGEFILE */
978 tmp = getname(filename);
979 fd = PTR_ERR(tmp);
980 if (!IS_ERR(tmp)) {
981 fd = get_unused_fd();
982 if (fd >= 0) {
983 struct file *f = filp_open(tmp, flags, mode);
984 error = PTR_ERR(f);
985 if (IS_ERR(f)) {
986 put_unused_fd(fd);
987 fd = error;
988 } else {
989 fsnotify_open(f->f_dentry);
990 fd_install(fd, f);
991 }
992 }
993 putname(tmp);
994 }
995 return fd;
996}
997
998extern asmlinkage long 972extern asmlinkage long
999sys_timer_create(clockid_t which_clock, 973sys_timer_create(clockid_t which_clock,
1000 struct sigevent __user *timer_event_spec, 974 struct sigevent __user *timer_event_spec,