aio: block exit_aio() until all context requests are completed
authorGu Zheng <guz.fnst@cn.fujitsu.com>
Wed, 3 Sep 2014 09:45:44 +0000 (17:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:24 +0000 (14:52 -0700)
commit0be0ec9c364fc3a44837d58c2210432690a27ff4
tree6055fece3735fbb553294d396ccfd61fa9748f2d
parented7150a026415687de272a8c58e13af0dd269b35
aio: block exit_aio() until all context requests are completed

commit 6098b45b32e6baeacc04790773ced9340601d511 upstream.

It seems that exit_aio() also needs to wait for all iocbs to complete (like
io_destroy), but we missed the wait step in current implemention, so fix
it in the same way as we did in io_destroy.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/aio.c