Fix the same bug reported by Kirill Malkin <kirill.malkin@starboardstorage.com> and
authorJeremy Allison <jra@samba.org>
Thu, 12 Apr 2012 20:15:23 +0000 (13:15 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 12 Apr 2012 22:06:58 +0000 (15:06 -0700)
commit80a4e38d6465d8ae47ca113027421af852d34316
tree29cec65c62f31bd5216ef6d0feb5b1b3346ecbbd
parentf6328b14c8d5fbc36d4597ebd52f74bfd60d92fc
Fix the same bug reported by Kirill Malkin <kirill.malkin@starboardstorage.com>  and
fixed by Volker for vfs_aio_fork as ref 0aacdbfada46329e0ad9dacfa90041a1c7dbf3e8.

From that change:

    aio_suspend does not signal the main process with a signal, it just waits. The
    aio_fork module does not use the signal at all, it directly calls back into the
    main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
    violation, but the alternative would have been to use signals where they are
    not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
    call handle_aio_completed twice on the same aio_ex struct: Once from the call
    to handle_aio_completion within the aio_fork module and once from the code in
    wait_for_aio_completion.

Fix this differently here by not calling directly back into smbd,
but using a new function aio_linux_setup_returns() to setup the
return values that wait_for_aio_completion() in the main smbd
will pick up by calling handle_aio_completd().
source3/modules/vfs_aio_linux.c