summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_aio_fork.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c
index 16a1301c5e..30d4b93ee7 100644
--- a/source3/modules/vfs_aio_fork.c
+++ b/source3/modules/vfs_aio_fork.c
@@ -827,6 +827,8 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
*/
for (child = children->children; child != NULL; child = child->next) {
+ struct tevent_fd *event;
+
if (child->aiocb == NULL) {
continue;
}
@@ -841,16 +843,12 @@ static int aio_fork_suspend(struct vfs_handle_struct *handle,
continue;
}
- /* We're never using this event on the
- * main event context again... */
- TALLOC_FREE(child->sock_event);
-
- child->sock_event = event_add_fd(ev,
- child,
- child->sockfd,
- EVENT_FD_READ,
- handle_aio_completion,
- child);
+ event = event_add_fd(ev,
+ frame,
+ child->sockfd,
+ EVENT_FD_READ,
+ handle_aio_completion,
+ child);
while (1) {
if (tevent_loop_once(ev) == -1) {