[Pkg-samba-maint] [samba] 118/135: s3-aio: Use correct locking context for SMB2

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit 53bdc43bdf3220519d96cd56e8b4811c24a49515
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 15:57:54 2013 -0700

    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit dfef0701c398982226dde8a8e15ff97bba0fef53)
---
 source3/smbd/aio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 24a822e..eec29f6 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);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list