lib/waiter: Defer free of removed waiters
authorJeremy Kerr <jk@ozlabs.org>
Wed, 10 Jul 2013 07:50:43 +0000 (15:50 +0800)
committerGeoff Levand <geoff@infradead.org>
Tue, 23 Jul 2013 16:44:45 +0000 (09:44 -0700)
commit45c7385acbd1299cacfa5cc335ffa6a0f0523980
tree3b82b5611556d352078373c04360b754ea5a845d
parentd92fff7d8898acc1a56607fbb5a6897a70041344
lib/waiter: Defer free of removed waiters

We may end up calling remove()-d time waiters if the timeout expires as
we're processing an IO waiter. Instead of freeing the waiter in
waiter_remove, mark the waiter as inactive, and defer the free until the
end of waiter_poll().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/waiter/waiter.c