summaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-26 21:27:40 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:07 -0400
commit5e196a9cf557dbc2bf808824c6c4998150e18d06 (patch)
treee0a209f3bc1b8029f461b79557a643c687e4a3ad /fs/eventpoll.c
parentecd188159efa112770d5f8a4a62f8d3586784f48 (diff)
switch epoll_wait(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index eedec84c180..567ae72e155 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1809,7 +1809,7 @@ error_return:
SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
int, maxevents, int, timeout)
{
- int error;
+ int error, fput_needed;
struct file *file;
struct eventpoll *ep;
@@ -1825,7 +1825,7 @@ SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
/* Get the "struct file *" for the eventpoll file */
error = -EBADF;
- file = fget(epfd);
+ file = fget_light(epfd, &fput_needed);
if (!file)
goto error_return;
@@ -1847,7 +1847,7 @@ SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
error = ep_poll(ep, events, maxevents, timeout);
error_fput:
- fput(file);
+ fput_light(file, fput_needed);
error_return:
return error;