From: Al Viro Date: Mon, 27 Aug 2012 01:27:40 +0000 (-0400) Subject: switch epoll_wait(2) to fget_light() X-Git-Tag: next-20120928~93^2~27 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5e196a9cf557dbc2bf808824c6c4998150e18d06;p=karo-tx-linux.git switch epoll_wait(2) to fget_light() Signed-off-by: Al Viro --- diff --git a/fs/eventpoll.c b/fs/eventpoll.c index eedec84c1809..567ae72e155d 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;