]> git.karo-electronics.de Git - karo-tx-linux.git/commit
aio: io_getevents() should return if io_destroy() is invoked
authorJeff Moyer <jmoyer@redhat.com>
Mon, 28 Apr 2008 17:15:24 +0000 (17:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 May 2008 21:44:37 +0000 (14:44 -0700)
commitbcf2286df0f605a6e44212a494eafa95b8f6c64e
treeaefd97e96a9882e717c57f324e7cf3a355cf91ac
parent71d27b2ed5191a1c5b32e360e74f32fe513d6ed2
aio: io_getevents() should return if io_destroy() is invoked

commit e92adcba261fd391591bb63c1703185a04a41554 upstream

This patch wakes up a thread waiting in io_getevents if another thread
destroys the context.  This was tested using a small program that spawns a
thread to wait in io_getevents while the parent thread destroys the io context
and then waits for the getevents thread to exit.  Without this patch, the
program hangs indefinitely.  With the patch, the program exits as expected.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Christopher Smith <x@xman.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/aio.c