diff options
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 1923ef889f..9f7390bba3 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -23,6 +23,7 @@ #include "smbd/globals.h" #include "../lib/util/tevent_ntstatus.h" #include "../lib/util/tevent_unix.h" +#include "lib/tevent_wait.h" /**************************************************************************** The buffer we keep around whilst an aio request is in process. @@ -107,6 +108,10 @@ static int aio_del_req_from_fsp(struct aio_req_fsp_link *lnk) } fsp->num_aio_requests -= 1; fsp->aio_requests[i] = fsp->aio_requests[fsp->num_aio_requests]; + + if (fsp->num_aio_requests == 0) { + tevent_wait_done(fsp->deferred_close); + } return 0; } |