[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jul 31 02:24:02 UTC 2018


The branch, master has been updated
       via  80c9219 s3/locking: Fix assertion check on lock reference count
      from  c891df4 lib ldb key value: convert TDB_DATA structs to ldb_val

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 80c9219d6079532f31c4e415906a606d395af6e8
Author: Anoop C S <anoopcs at redhat.com>
Date:   Fri Jul 27 11:50:39 2018 +0530

    s3/locking: Fix assertion check on lock reference count
    
    lock_ref_count will always hold the old value prior to change. Thus it
    would mean that if lock_ref_count is 0 the new value is already -1 which
    is not expected here. Therefore it is better to make sure that it is
    always greater than 0 rather than >= 0.
    
    Signed-off-by: Anoop C S <anoopcs at redhat.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jul 31 04:23:47 CEST 2018 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source3/locking/posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 0b627aa..1399266 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -454,7 +454,7 @@ static void decrement_lock_ref_count(const files_struct *fsp)
 		&lock_ref_count, -1);
 
 	SMB_ASSERT(NT_STATUS_IS_OK(status));
-	SMB_ASSERT(lock_ref_count >= 0);
+	SMB_ASSERT(lock_ref_count > 0);
 
 	DEBUG(10,("lock_ref_count for file %s = %d\n",
 		  fsp_str_dbg(fsp), (int)lock_ref_count));


-- 
Samba Shared Repository



More information about the samba-cvs mailing list