aboutsummaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-10-27 10:50:54 +0100
committerIngo Molnar <mingo@elte.hu>2008-10-27 10:50:54 +0100
commit4944dd62de21230af039eda7cd218e9a09021d11 (patch)
treebac70f7bab8506c7e1b0408bacbdb0b1d77262e9 /fs/eventpoll.c
parentftrace: warning in kernel/trace/ftrace.c (diff)
parentLinux 2.6.28-rc2 (diff)
downloadlinux-dev-4944dd62de21230af039eda7cd218e9a09021d11.tar.xz
linux-dev-4944dd62de21230af039eda7cd218e9a09021d11.zip
Merge commit 'v2.6.28-rc2' into tracing/urgent
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 99368bda0261..aec5c13f6341 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -930,8 +930,15 @@ errxit:
* inside the main ready-list here.
*/
for (nepi = ep->ovflist; (epi = nepi) != NULL;
- nepi = epi->next, epi->next = EP_UNACTIVE_PTR)
- list_add_tail(&epi->rdllink, &ep->rdllist);
+ nepi = epi->next, epi->next = EP_UNACTIVE_PTR) {
+ /*
+ * If the above loop quit with errors, the epoll item might still
+ * be linked to "txlist", and the list_splice() done below will
+ * take care of those cases.
+ */
+ if (!ep_is_linked(&epi->rdllink))
+ 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