diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-05-11 18:18:24 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-05-12 19:53:44 +0000 |
commit | ba68f21286c2c2f1fef8bf8c9cd500a622077887 (patch) | |
tree | 44844acf85377f9db3181109ba47de7548bbce36 /source3/smbd/aio.c | |
parent | a6eee38ba2f89280676f0a32d26745afd95b551c (diff) | |
download | samba-ba68f21286c2c2f1fef8bf8c9cd500a622077887.tar.gz |
s3:smbd: handle 0 length writes as no-op.
They should never touch the SMB_VFS layer
and they never trigger an DISK_FULL error.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 7ed2691cfbf..f89ce8537a0 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -337,6 +337,11 @@ static struct tevent_req *pwrite_fsync_send(TALLOC_CTX *mem_ctx, state->fsp = fsp; state->write_through = write_through; + if (n == 0) { + tevent_req_done(req); + return tevent_req_post(req, ev); + } + subreq = SMB_VFS_PWRITE_SEND(state, ev, fsp, data, n, offset); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); |