epoll: add a reschedule point in ep_free()
authorEric Dumazet <edumazet@google.com>
Wed, 11 Sep 2013 21:24:06 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:58:50 +0000 (15:58 -0700)
commit91cf5ab60ff82ecf4550a596867787c1e360dd3f
treebcfba2f74873abc7c59fc2d3c4e5ae27ad4386f7
parent8716de383b82f16d920513138f1691e40ef5a9e3
epoll: add a reschedule point in ep_free()

ep_free() might iterate on a huge set of epitems and hold cpu too long.
Add two cond_resched() in order to yield cpu to other tasks.  This is safe
as we only hold mutexes in this function.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Theodore Ts'o <tytso@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c