summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-31 13:34:42 +0200
committerVolker Lendecke <vl@samba.org>2012-03-31 13:51:17 +0200
commit7f7c2d721d1e336a86b29fecc81f5c0e28d105dc (patch)
tree94c6d7a6c7e245199fb817bb5fcf97fad153a1ec /source3
parentaef86982b845072d8624294f5c557eb315740467 (diff)
downloadsamba-7f7c2d721d1e336a86b29fecc81f5c0e28d105dc.tar.gz
samba-7f7c2d721d1e336a86b29fecc81f5c0e28d105dc.tar.xz
samba-7f7c2d721d1e336a86b29fecc81f5c0e28d105dc.zip
s3-aio-fork: Fix aio_suspend event hierarchy
We end up here multiple times. There's no real point putting the events into the child struct, at the end of this routine we need to free them anyway.
Diffstat (limited to 'source3')
-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 16a1301c5e3..30d4b93ee7f 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) {