diff options
author | Christof Schmitt <cs@samba.org> | 2013-12-05 15:57:54 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-12-05 18:22:16 -0800 |
commit | dfef0701c398982226dde8a8e15ff97bba0fef53 (patch) | |
tree | 729152cc47ab65212fd58eb136a9705f49e9e3c8 /source3/smbd/aio.c | |
parent | 30231b256d8b14337a7ffe04fc031cf5693110f4 (diff) | |
download | samba-dfef0701c398982226dde8a8e15ff97bba0fef53.tar.gz |
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>
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r-- | source3/smbd/aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index 24a822e3fd8..eec29f664f3 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -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); |