]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_default: Add tevent_req pointer to state struct in vfswrap_pwrite_state.
authorJeremy Allison <jra@samba.org>
Fri, 28 Feb 2020 00:44:39 +0000 (16:44 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 8 Mar 2020 18:07:43 +0000 (18:07 +0000)
We will need this to detect when this request is outstanding but
has been destroyed in a SHUTDOWN_CLOSE on this file.

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_default.c

index 21bc9c7adf78099cd42b3a1eedd1a771d09d543b..cbc8335cd12433009ce9845e7741ba5d8a0db7d0 100644 (file)
@@ -929,6 +929,7 @@ static ssize_t vfswrap_pread_recv(struct tevent_req *req,
 }
 
 struct vfswrap_pwrite_state {
+       struct tevent_req *req;
        ssize_t ret;
        int fd;
        const void *buf;
@@ -958,6 +959,7 @@ static struct tevent_req *vfswrap_pwrite_send(struct vfs_handle_struct *handle,
                return NULL;
        }
 
+       state->req = req;
        state->ret = -1;
        state->fd = fsp->fh->fd;
        state->buf = data;