Commit ddbf9598 authored by David Mosberger's avatar David Mosberger

ia64: For ia32 emulation, do not turn on O_LARGEFILE automatically

	on open().  Reported by Andi Kleen.
parent 2d8c2c09
...@@ -196,7 +196,7 @@ ia32_syscall_table: ...@@ -196,7 +196,7 @@ ia32_syscall_table:
data8 sys32_fork data8 sys32_fork
data8 sys_read data8 sys_read
data8 sys_write data8 sys_write
data8 sys_open /* 5 */ data8 sys32_open /* 5 */
data8 sys_close data8 sys_close
data8 sys32_waitpid data8 sys32_waitpid
data8 sys_creat data8 sys_creat
......
...@@ -3700,6 +3700,37 @@ sys32_brk (unsigned int brk) ...@@ -3700,6 +3700,37 @@ sys32_brk (unsigned int brk)
return ret; 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 * 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;
}
#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ #ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
struct ncp_mount_data32 { struct ncp_mount_data32 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment