diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-11-14 09:53:25 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-11-15 17:14:13 +0100 |
commit | 21eb1450cc2541e23dedf1a0dec24e3313ab8739 (patch) | |
tree | 031ce9d3fba984b744f9a2c22c09f96cbecd2631 /source3 | |
parent | 483b79cfc4af4dd48089b12b279d174f54132e9d (diff) | |
download | samba-21eb1450cc2541e23dedf1a0dec24e3313ab8739.tar.gz samba-21eb1450cc2541e23dedf1a0dec24e3313ab8739.tar.bz2 samba-21eb1450cc2541e23dedf1a0dec24e3313ab8739.zip |
s3:smbd/aio: pass ECANCELED to the smb2 aio handlers
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/aio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index a978c4f87c..2e9359e5ae 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -49,6 +49,7 @@ struct aio_extra { DATA_BLOB outbuf; struct lock_struct lock; bool write_through; + bool pass_cancel; int (*handle_completion)(struct aio_extra *ex, int errcode); }; @@ -471,6 +472,7 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn, return NT_STATUS_NO_MEMORY; } aio_ex->handle_completion = handle_aio_smb2_read_complete; + aio_ex->pass_cancel = true; init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid, (uint64_t)startpos, (uint64_t)smb_maxcnt, READ_LOCK, @@ -572,6 +574,7 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn, aio_ex->handle_completion = handle_aio_smb2_write_complete; aio_ex->write_through = write_through; + aio_ex->pass_cancel = true; init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid, in_offset, (uint64_t)in_data.length, WRITE_LOCK, @@ -883,7 +886,7 @@ static bool handle_aio_completed(struct aio_extra *aio_ex, int *perr) /* Unlock now we're done. */ SMB_VFS_STRICT_UNLOCK(fsp->conn, fsp, &aio_ex->lock); - if (err == ECANCELED) { + if (!aio_ex->pass_cancel && err == ECANCELED) { /* If error is ECANCELED then don't return anything to the * client. */ DEBUG(10,( "handle_aio_completed: operation mid %llu" |