1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

s3-aio: Use correct locking context for SMB2

The synchronous SMB2 reads and writes use open_persistent_id. The AIO
codepathes have to use the same, otherwise a write will conflict with a
lock on the same open file.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Christof Schmitt 2013-12-05 15:57:54 -07:00 committed by Jeremy Allison
parent 30231b256d
commit dfef0701c3

View File

@ -720,7 +720,7 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
return NT_STATUS_NO_MEMORY;
}
init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid,
init_strict_lock_struct(fsp, fsp->op->global->open_persistent_id,
(uint64_t)startpos, (uint64_t)smb_maxcnt, READ_LOCK,
&aio_ex->lock);
@ -872,7 +872,7 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
aio_ex->write_through = write_through;
init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid,
init_strict_lock_struct(fsp, fsp->op->global->open_persistent_id,
in_offset, (uint64_t)in_data.length, WRITE_LOCK,
&aio_ex->lock);