[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>
This commit is contained in:
Miklos Szeredi
2005-09-06 15:18:25 -07:00
committed by Linus Torvalds
parent ab8d11beb4
commit e922efc342
10 changed files with 26 additions and 122 deletions

View File

@@ -2359,37 +2359,6 @@ sys32_brk (unsigned int brk)
return ret;
}
/*
* Exactly like fs/open.c:sys_open(), except that it doesn't set the O_LARGEFILE flag.
*/
asmlinkage long
sys32_open (const char __user * filename, int flags, int mode)
{
char * tmp;
int fd, error;
tmp = getname(filename);
fd = PTR_ERR(tmp);
if (!IS_ERR(tmp)) {
fd = get_unused_fd();
if (fd >= 0) {
struct file *f = filp_open(tmp, flags, mode);
error = PTR_ERR(f);
if (IS_ERR(f))
goto out_error;
fd_install(fd, f);
}
out:
putname(tmp);
}
return fd;
out_error:
put_unused_fd(fd);
fd = error;
goto out;
}
/* Structure for ia32 emulation on ia64 */
struct epoll_event32
{