s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_pwrite_state as the callback data...
authorJeremy Allison <jra@samba.org>
Fri, 28 Feb 2020 23:53:19 +0000 (15:53 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 8 Mar 2020 18:07:44 +0000 (18:07 +0000)
commit3357a77d0823eddc1b0db68cfa251a0d54058c88
treeb4da5efe3dbdf2d3e92a1189a77e3491e0bee381
parent058a7effd00b47e4778f7d680cc9c2a7d40d5fa8
s3: VFS: vfs_glusterfs. Pass in struct vfs_gluster_pwrite_state as the callback data to the subreq.

Find the req we're finishing off by looking inside vfs_gluster_pwrite_state.
In a shutdown close the caller calls talloc_free(req), so we can't
access it directly as callback data.

The next commit will NULL out the vfs_gluster_pwrite_state->req pointer
when a caller calls talloc_free(req), and the request is still in
flight.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/modules/vfs_glusterfs.c