vfs_default: pass in state as the callback data to the subreq
authorRalph Boehme <slow@samba.org>
Mon, 9 Mar 2020 10:54:28 +0000 (11:54 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 9 Mar 2020 18:07:34 +0000 (18:07 +0000)
commit0e894f3e48285415f72cf7a68e26f1802fe8045d
tree64fbaa173ac96a6ddcbf0869926c83f6ac05636d
parent54c21a99e6ca54bdb963c70d322f6778b57a384f
vfs_default: pass in state as the callback data to the subreq

Find the req we're finishing off by looking inside the 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 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: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c