s3: Return correct error code from SMB2 AIO read failure
authorChristof Schmitt <cs@samba.org>
Thu, 5 Dec 2013 23:20:26 +0000 (16:20 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 6 Dec 2013 02:22:16 +0000 (18:22 -0800)
This is similar to commit 27e20d5d60ea8aa526bcb7c2dfc18dd2de0bb97b which
fixed the same case for SMB2 writes: When sending the AIO read fails,
return the real error instead of mapping it to NT_STATUS_FILE_CLOSED.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_read.c

index d6d3d908787e248ebaa40600c0902defec51c3b4..6478326ac068dfe10ff0dbdca77dd6c85d6b5ea8 100644 (file)
@@ -464,7 +464,7 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
 
        if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
                /* Real error in setting up aio. Fail. */
-               tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
+               tevent_req_nterror(req, status);
                return tevent_req_post(req, ev);
        }