epoll: fix compiler warning and optimize the non-blocking path
authorShawn Bohrer <[email protected]>
Tue, 22 Mar 2011 23:34:47 +0000 (16:34 -0700)
committerLinus Torvalds <[email protected]>
Wed, 23 Mar 2011 00:44:15 +0000 (17:44 -0700)
commitf4d93ad74c18143abd3067ca3c8ffba7d00addf4
tree470d7e53e696c9ff2f8e62caabb50e365ac9ca8c
parent3fb0e584a68cd1c5085e69be441f2ad032aaee72
epoll: fix compiler warning and optimize the non-blocking path

Add a comment to ep_poll(), rename labels a bit clearly, fix a warning of
unused variable from gcc and optimize the non-blocking path a little.

Hinted-by: Andrew Morton <[email protected]>
Signed-off-by: Davide Libenzi <[email protected]>
[email protected]:

: The non-blocking ep_poll path optimization introduced skipping over the
: return value setup.
:
: Initialize it properly, my userspace gets upset by epoll_wait() returning
: random things.
:
: In addition, remove the reinitialization at the fetch_events label, the
: return value is garuanteed to be zero when execution reaches there.

[[email protected]: fix initialization]
Signed-off-by: Johannes Weiner <[email protected]>
Cc: Shawn Bohrer <[email protected]>
Acked-by: Davide Libenzi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/eventpoll.c