s3: Make us survive smb2.lock.rw-shared with aio enabled
authorVolker Lendecke <vl@samba.org>
Fri, 13 Jul 2012 06:38:07 +0000 (08:38 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 13 Jul 2012 19:53:51 +0000 (21:53 +0200)
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.

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 21:53:51 CEST 2012 on sn-devel-104

source3/smbd/smb2_write.c

index 8ddd8cc783b95f15580bd806d600a35d70b7d4c3..6a78939505ae82529a4f569e8c10fe7672770835 100644 (file)
@@ -318,7 +318,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);
        }