Ensure we don't do an SMB2 aio write if RECVFILE is active.
authorJeremy Allison <jra@samba.org>
Mon, 18 Mar 2013 19:00:25 +0000 (12:00 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 19 Apr 2013 21:10:14 +0000 (14:10 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
source3/smbd/aio.c

index 3f553ebcfb2ded3aa6fd4145931494349116ac56..e8be408eaa1279963b07ecc1264a736a0ab350ca 100644 (file)
@@ -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;
        }