diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-11 20:12:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-11 20:12:17 -0500 |
commit | 501706565b2d4d2d40d0d301d5411ede099b8a6f (patch) | |
tree | 142a18bf1f1e74a09dbfa27540b893ade0fd797d /arch/x86/ia32/sys_ia32.c | |
parent | e93737b0f0159a61772894943199fd3b6f315641 (diff) | |
parent | 2fe77b81c77eed92c4c0439f74c8148a295b4a86 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
include/net/tcp.h
Diffstat (limited to 'arch/x86/ia32/sys_ia32.c')
-rw-r--r-- | arch/x86/ia32/sys_ia32.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index df82c0e48ded..422572c77923 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -155,9 +155,6 @@ struct mmap_arg_struct { | |||
155 | asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg) | 155 | asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg) |
156 | { | 156 | { |
157 | struct mmap_arg_struct a; | 157 | struct mmap_arg_struct a; |
158 | struct file *file = NULL; | ||
159 | unsigned long retval; | ||
160 | struct mm_struct *mm ; | ||
161 | 158 | ||
162 | if (copy_from_user(&a, arg, sizeof(a))) | 159 | if (copy_from_user(&a, arg, sizeof(a))) |
163 | return -EFAULT; | 160 | return -EFAULT; |
@@ -165,22 +162,8 @@ asmlinkage long sys32_mmap(struct mmap_arg_struct __user *arg) | |||
165 | if (a.offset & ~PAGE_MASK) | 162 | if (a.offset & ~PAGE_MASK) |
166 | return -EINVAL; | 163 | return -EINVAL; |
167 | 164 | ||
168 | if (!(a.flags & MAP_ANONYMOUS)) { | 165 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, |
169 | file = fget(a.fd); | ||
170 | if (!file) | ||
171 | return -EBADF; | ||
172 | } | ||
173 | |||
174 | mm = current->mm; | ||
175 | down_write(&mm->mmap_sem); | ||
176 | retval = do_mmap_pgoff(file, a.addr, a.len, a.prot, a.flags, | ||
177 | a.offset>>PAGE_SHIFT); | 166 | a.offset>>PAGE_SHIFT); |
178 | if (file) | ||
179 | fput(file); | ||
180 | |||
181 | up_write(&mm->mmap_sem); | ||
182 | |||
183 | return retval; | ||
184 | } | 167 | } |
185 | 168 | ||
186 | asmlinkage long sys32_mprotect(unsigned long start, size_t len, | 169 | asmlinkage long sys32_mprotect(unsigned long start, size_t len, |
@@ -483,30 +466,6 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, | |||
483 | return ret; | 466 | return ret; |
484 | } | 467 | } |
485 | 468 | ||
486 | asmlinkage long sys32_mmap2(unsigned long addr, unsigned long len, | ||
487 | unsigned long prot, unsigned long flags, | ||
488 | unsigned long fd, unsigned long pgoff) | ||
489 | { | ||
490 | struct mm_struct *mm = current->mm; | ||
491 | unsigned long error; | ||
492 | struct file *file = NULL; | ||
493 | |||
494 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
495 | if (!(flags & MAP_ANONYMOUS)) { | ||
496 | file = fget(fd); | ||
497 | if (!file) | ||
498 | return -EBADF; | ||
499 | } | ||
500 | |||
501 | down_write(&mm->mmap_sem); | ||
502 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
503 | up_write(&mm->mmap_sem); | ||
504 | |||
505 | if (file) | ||
506 | fput(file); | ||
507 | return error; | ||
508 | } | ||
509 | |||
510 | asmlinkage long sys32_olduname(struct oldold_utsname __user *name) | 469 | asmlinkage long sys32_olduname(struct oldold_utsname __user *name) |
511 | { | 470 | { |
512 | char *arch = "x86_64"; | 471 | char *arch = "x86_64"; |