diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/eventpoll.c | 11 |
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: | |||
930 | * inside the main ready-list here. | 930 | * inside the main ready-list here. |
931 | */ | 931 | */ |
932 | for (nepi = ep->ovflist; (epi = nepi) != NULL; | 932 | for (nepi = ep->ovflist; (epi = nepi) != NULL; |
933 | nepi = epi->next, epi->next = EP_UNACTIVE_PTR) | 933 | nepi = epi->next, epi->next = EP_UNACTIVE_PTR) { |
934 | list_add_tail(&epi->rdllink, &ep->rdllist); | 934 | /* |
935 | * If the above loop quit with errors, the epoll item might still | ||
936 | * be linked to "txlist", and the list_splice() done below will | ||
937 | * take care of those cases. | ||
938 | */ | ||
939 | if (!ep_is_linked(&epi->rdllink)) | ||
940 | list_add_tail(&epi->rdllink, &ep->rdllist); | ||
941 | } | ||
935 | /* | 942 | /* |
936 | * We need to set back ep->ovflist to EP_UNACTIVE_PTR, so that after | 943 | * We need to set back ep->ovflist to EP_UNACTIVE_PTR, so that after |
937 | * releasing the lock, events will be queued in the normal way inside | 944 | * releasing the lock, events will be queued in the normal way inside |