Revert "s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_fsync_state as the callbac...
authorJeremy Allison <jra@samba.org>
Fri, 13 Mar 2020 17:35:44 +0000 (10:35 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 18 Mar 2020 18:03:30 +0000 (18:03 +0000)
This reverts commit cdde55a69d0dacd2f9939c2f00cd356c0186f791.

Now we wait for all aio to finish on all SHUTDOWN_CLOSE
cases, this is no longer needed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_glusterfs.c

index 4706e6f918971863c520c4dfb07badfbe9bd9cd4..d5d402d72ab9eddd068d4769f6f05a959a3c6b4b 100644 (file)
@@ -1158,7 +1158,7 @@ static struct tevent_req *vfs_gluster_fsync_send(struct vfs_handle_struct
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }
-       tevent_req_set_callback(subreq, vfs_gluster_fsync_done, state);
+       tevent_req_set_callback(subreq, vfs_gluster_fsync_done, req);
 
        talloc_set_destructor(state, vfs_gluster_fsync_state_destructor);
 
@@ -1202,9 +1202,10 @@ static int vfs_gluster_fsync_state_destructor(struct vfs_gluster_fsync_state *st
 
 static void vfs_gluster_fsync_done(struct tevent_req *subreq)
 {
-       struct vfs_gluster_fsync_state *state = tevent_req_callback_data(
-               subreq, struct vfs_gluster_fsync_state);
-       struct tevent_req *req = state->req;
+       struct tevent_req *req = tevent_req_callback_data(
+               subreq, struct tevent_req);
+       struct vfs_gluster_fsync_state *state = tevent_req_data(
+               req, struct vfs_gluster_fsync_state);
        int ret;
 
        ret = pthreadpool_tevent_job_recv(subreq);