From 8f6116e98fc83088314266d80bff559afe5afbda Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 13 Jul 2012 08:38:07 +0200 Subject: [PATCH] s3: Make us survive smb2.lock.rw-shared with aio enabled schedule_aio_smb2_write can return NT_STATUS_FILE_LOCK_CONFLICT. This is a valid error code that smb2.lock.rw-shared expects and checks for. The code before this patch maps this to NT_STATUS_FILE_CLOSED, masking the real, correct error message. Fix bug #9040 - Using asynchronous IO with SMB2 can return NT_STATUS_FILE_CLOSED in error instead ofNT_STATUS_FILE_LOCK_CONFLICT. (cherry picked from commit 9c69a2359107b7c31feb03b9971e08645205e400) --- source3/smbd/smb2_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c index a8e5ec37a43..5aeed8c74eb 100644 --- a/source3/smbd/smb2_write.c +++ b/source3/smbd/smb2_write.c @@ -298,7 +298,7 @@ static struct tevent_req *smbd_smb2_write_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); } -- 2.11.4.GIT