From: Jeremy Allison Date: Fri, 13 Mar 2020 17:38:18 +0000 (-0700) Subject: Revert "s3: VFS: vfs_default. Pass in struct vfswrap_fsync_state as the callback... X-Git-Tag: ldb-2.2.0~1412 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22ebf32f3e8d404e9b4fccadbeb4ee94dff8b2cc;p=thirdparty%2Fsamba.git Revert "s3: VFS: vfs_default. Pass in struct vfswrap_fsync_state as the callback data to the subreq." This reverts commit d623779913e0d4a46d7e299dc41b5c83cb127872. 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_default.c b/source3/modules/vfs_default.c index f9d958a003d..28b8c04dee4 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1116,7 +1116,7 @@ static struct tevent_req *vfswrap_fsync_send(struct vfs_handle_struct *handle, if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - tevent_req_set_callback(subreq, vfs_fsync_done, state); + tevent_req_set_callback(subreq, vfs_fsync_done, req); talloc_set_destructor(state, vfs_fsync_state_destructor); @@ -1156,9 +1156,10 @@ static int vfs_fsync_state_destructor(struct vfswrap_fsync_state *state) static void vfs_fsync_done(struct tevent_req *subreq) { - struct vfswrap_fsync_state *state = tevent_req_callback_data( - subreq, struct vfswrap_fsync_state); - struct tevent_req *req = state->req; + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct vfswrap_fsync_state *state = tevent_req_data( + req, struct vfswrap_fsync_state); int ret; ret = pthreadpool_tevent_job_recv(subreq);