Skip to content

Commit

Permalink
fs: remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol
Browse files Browse the repository at this point in the history
Remove dead config CONFIG_HAS_COMPAT_EPOLL_EVENT symbol.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Davide Libenzi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
olsajiri authored and Linus Torvalds committed Feb 6, 2008
1 parent de9330d commit 0321155
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
49 changes: 0 additions & 49 deletions fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2083,51 +2083,6 @@ long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2)

#ifdef CONFIG_EPOLL

#ifdef CONFIG_HAS_COMPAT_EPOLL_EVENT
asmlinkage long compat_sys_epoll_ctl(int epfd, int op, int fd,
struct compat_epoll_event __user *event)
{
long err = 0;
struct compat_epoll_event user;
struct epoll_event __user *kernel = NULL;

if (event) {
if (copy_from_user(&user, event, sizeof(user)))
return -EFAULT;
kernel = compat_alloc_user_space(sizeof(struct epoll_event));
err |= __put_user(user.events, &kernel->events);
err |= __put_user(user.data, &kernel->data);
}

return err ? err : sys_epoll_ctl(epfd, op, fd, kernel);
}


asmlinkage long compat_sys_epoll_wait(int epfd,
struct compat_epoll_event __user *events,
int maxevents, int timeout)
{
long i, ret, err = 0;
struct epoll_event __user *kbuf;
struct epoll_event ev;

if ((maxevents <= 0) ||
(maxevents > (INT_MAX / sizeof(struct epoll_event))))
return -EINVAL;
kbuf = compat_alloc_user_space(sizeof(struct epoll_event) * maxevents);
ret = sys_epoll_wait(epfd, kbuf, maxevents, timeout);
for (i = 0; i < ret; i++) {
err |= __get_user(ev.events, &kbuf[i].events);
err |= __get_user(ev.data, &kbuf[i].data);
err |= __put_user(ev.events, &events->events);
err |= __put_user_unaligned(ev.data, &events->data);
events++;
}

return err ? -EFAULT: ret;
}
#endif /* CONFIG_HAS_COMPAT_EPOLL_EVENT */

#ifdef TIF_RESTORE_SIGMASK
asmlinkage long compat_sys_epoll_pwait(int epfd,
struct compat_epoll_event __user *events,
Expand All @@ -2153,11 +2108,7 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
}

#ifdef CONFIG_HAS_COMPAT_EPOLL_EVENT
err = compat_sys_epoll_wait(epfd, events, maxevents, timeout);
#else
err = sys_epoll_wait(epfd, events, maxevents, timeout);
#endif

/*
* If we changed the signal mask, we need to restore the original one.
Expand Down
8 changes: 0 additions & 8 deletions include/linux/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,8 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
/*
* epoll (fs/eventpoll.c) compat bits follow ...
*/
#ifndef CONFIG_HAS_COMPAT_EPOLL_EVENT
struct epoll_event;
#define compat_epoll_event epoll_event
#else
asmlinkage long compat_sys_epoll_ctl(int epfd, int op, int fd,
struct compat_epoll_event __user *event);
asmlinkage long compat_sys_epoll_wait(int epfd,
struct compat_epoll_event __user *events,
int maxevents, int timeout);
#endif
asmlinkage long compat_sys_epoll_pwait(int epfd,
struct compat_epoll_event __user *events,
int maxevents, int timeout,
Expand Down

0 comments on commit 0321155

Please sign in to comment.