From e8c0bdb423156ebcbdba04843d0dc2dfba383197 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Mar 2020 10:36:39 -0700 Subject: [PATCH] Revert "s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_pwrite_state as the callback data to the subreq." This reverts commit 3357a77d0823eddc1b0db68cfa251a0d54058c88. 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 Reviewed-by: Ralph Boehme --- source3/modules/vfs_glusterfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 52c33725b8d..456e0c8a498 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -926,7 +926,7 @@ static struct tevent_req *vfs_gluster_pwrite_send(struct vfs_handle_struct if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, vfs_gluster_pwrite_done, state); + tevent_req_set_callback(subreq, vfs_gluster_pwrite_done, req); talloc_set_destructor(state, vfs_gluster_pwrite_state_destructor); @@ -972,9 +972,10 @@ static int vfs_gluster_pwrite_state_destructor(struct vfs_gluster_pwrite_state * static void vfs_gluster_pwrite_done(struct tevent_req *subreq) { - struct vfs_gluster_pwrite_state *state = tevent_req_callback_data( - subreq, struct vfs_gluster_pwrite_state); - struct tevent_req *req = state->req; + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct vfs_gluster_pwrite_state *state = tevent_req_data( + req, struct vfs_gluster_pwrite_state); int ret; ret = pthreadpool_tevent_job_recv(subreq);