From: Jeremy Allison Date: Fri, 13 Mar 2020 17:37:30 +0000 (-0700) Subject: Revert "s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_pread_state as the callbac... X-Git-Tag: ldb-2.2.0~1415 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=097e48fa2c190e79a14730d054e163f6c01a2663;p=thirdparty%2Fsamba.git Revert "s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_pread_state as the callback data to the subreq." This reverts commit c6c4e2de22cd3d84f45f5c21e6b09b09274f7f7b. 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 --- diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 84b284152c6..6598aadad17 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -766,7 +766,7 @@ static struct tevent_req *vfs_gluster_pread_send(struct vfs_handle_struct if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, vfs_gluster_pread_done, state); + tevent_req_set_callback(subreq, vfs_gluster_pread_done, req); talloc_set_destructor(state, vfs_gluster_pread_state_destructor); @@ -812,9 +812,10 @@ static int vfs_gluster_pread_state_destructor(struct vfs_gluster_pread_state *st static void vfs_gluster_pread_done(struct tevent_req *subreq) { - struct vfs_gluster_pread_state *state = tevent_req_callback_data( - subreq, struct vfs_gluster_pread_state); - struct tevent_req *req = state->req; + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct vfs_gluster_pread_state *state = tevent_req_data( + req, struct vfs_gluster_pread_state); int ret; ret = pthreadpool_tevent_job_recv(subreq);