]> git.kernelconcepts.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 09:12:04 +0000 (02:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:17 +0000 (08:58 -0700)
commite92adcba261fd391591bb63c1703185a04a41554
tree83cd94eaa57931da66137a65089a0bcdddf20533
parent180c06efce691f2b721dd0d965079827bdd7ee03
aio: io_getevents() should return if io_destroy() is invoked

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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/aio.c