diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2009-11-30 17:37:04 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-11 06:44:29 -0500 |
| commit | f8b7256096a20436f6d0926747e3ac3d64c81d24 (patch) | |
| tree | 18bcabd1de263bd2d0f8d6b763bde8b037716c5c /arch/xtensa/kernel | |
| parent | 0067bd8a55862ac9dd212bd1c4f6f5bff1ca1301 (diff) | |
Unify sys_mmap*
New helper - sys_mmap_pgoff(); switch syscalls to using it.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/xtensa/kernel')
| -rw-r--r-- | arch/xtensa/kernel/syscall.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index ac15ecbdf91..1e67bab775c 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c | |||
| @@ -57,31 +57,6 @@ asmlinkage long xtensa_pipe(int __user *userfds) | |||
| 57 | return error; | 57 | return error; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | |||
| 61 | asmlinkage long xtensa_mmap2(unsigned long addr, unsigned long len, | ||
| 62 | unsigned long prot, unsigned long flags, | ||
| 63 | unsigned long fd, unsigned long pgoff) | ||
| 64 | { | ||
| 65 | int error = -EBADF; | ||
| 66 | struct file * file = NULL; | ||
| 67 | |||
| 68 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | ||
| 69 | if (!(flags & MAP_ANONYMOUS)) { | ||
| 70 | file = fget(fd); | ||
| 71 | if (!file) | ||
| 72 | goto out; | ||
| 73 | } | ||
| 74 | |||
| 75 | down_write(¤t->mm->mmap_sem); | ||
| 76 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | ||
| 77 | up_write(¤t->mm->mmap_sem); | ||
| 78 | |||
| 79 | if (file) | ||
| 80 | fput(file); | ||
| 81 | out: | ||
| 82 | return error; | ||
| 83 | } | ||
| 84 | |||
| 85 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) | 60 | asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) |
| 86 | { | 61 | { |
| 87 | unsigned long ret; | 62 | unsigned long ret; |
