summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2008-10-15 22:01:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 11:21:32 -0700
commitf337b9c58332bdecde965b436e47ea4c94d30da0 (patch)
tree0b630e4cd2cc19f29d56716162defa301f82bf65 /fs
parent8b6e47ad062e6ac993fb80256344fc499c1e827b (diff)
downloadop-kernel-dev-f337b9c58332bdecde965b436e47ea4c94d30da0.zip
op-kernel-dev-f337b9c58332bdecde965b436e47ea4c94d30da0.tar.gz
epoll: drop unnecessary test
Thomas found that there is an unnecessary (always true) test in ep_send_events(). The callback never inserts into ->rdllink while the send loop is performed, and also does the ~EP_PRIVATE_BITS test. Given we're holding the mutex during this time, the conditions tested inside the loop are always true. This patch drops the test done inside the re-insertion loop. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/eventpoll.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 7cc0eb7..99368bd 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -927,14 +927,11 @@ errxit:
/*
* During the time we spent in the loop above, some other events
* might have been queued by the poll callback. We re-insert them
- * here (in case they are not already queued, or they're one-shot).
+ * inside the main ready-list here.
*/
for (nepi = ep->ovflist; (epi = nepi) != NULL;
- nepi = epi->next, epi->next = EP_UNACTIVE_PTR) {
- if (!ep_is_linked(&epi->rdllink) &&
- (epi->event.events & ~EP_PRIVATE_BITS))
- list_add_tail(&epi->rdllink, &ep->rdllist);
- }
+ nepi = epi->next, epi->next = EP_UNACTIVE_PTR)
+ list_add_tail(&epi->rdllink, &ep->rdllist);
/*
* We need to set back ep->ovflist to EP_UNACTIVE_PTR, so that after
* releasing the lock, events will be queued in the normal way inside
OpenPOWER on IntegriCloud