]> git.baikalelectronics.ru Git - kernel.git/commit
aio: report error from io_destroy() when threads race in io_destroy()
authorBenjamin LaHaise <bcrl@kvack.org>
Tue, 29 Apr 2014 16:45:17 +0000 (12:45 -0400)
committerBenjamin LaHaise <bcrl@kvack.org>
Tue, 29 Apr 2014 16:45:17 +0000 (12:45 -0400)
commite863c67bbbbfe87320af630e28639c3dc611256a
treebb88488c0bcb41cd7e1267afa85a5d8871eb37b3
parent92740919c021dc15c2c3369eea7c321a82fbd959
aio: report error from io_destroy() when threads race in io_destroy()

As reported by Anatol Pomozov, io_destroy() fails to report an error when
it loses the race to destroy a given ioctx.  Since there is a difference in
behaviour between the thread that wins the race (which blocks on outstanding
io requests) versus lthe thread that loses (which returns immediately), wire
up a return code from kill_ioctx() to the io_destroy() syscall.

Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>
fs/aio.c