From 9791c1a24822d8b46bf7dd231b615d281b58540b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Mar 2013 12:00:25 -0700 Subject: [PATCH] Ensure we don't do an SMB2 aio write if RECVFILE is active. Signed-off-by: Jeremy Allison Reviewed-by: Stefan (metze) Metzmacher --- source3/smbd/aio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 3f553ebcfb2..e8be408eaa1 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -861,6 +861,11 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn, return NT_STATUS_RETRY; } + if (smbreq->unread_bytes) { + /* Can't do async with recvfile. */ + return NT_STATUS_RETRY; + } + if (!(aio_ex = create_aio_extra(smbreq->smb2req, fsp, 0))) { return NT_STATUS_NO_MEMORY; } -- 2.11.4.GIT