svn commit: samba r3008 - in branches/SAMBA_3_0/source/locking: .

tridge at samba.org tridge at samba.org
Sun Oct 17 00:22:13 GMT 2004


Author: tridge
Date: 2004-10-17 00:22:11 +0000 (Sun, 17 Oct 2004)
New Revision: 3008

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/locking&rev=3008&nolog=1

Log:
when checking for the existance of a lock we are only doing a single
tdb call, so there is no need to get the chainlock. This reduces the
number of tdb locking calls made on file IO

Modified:
   branches/SAMBA_3_0/source/locking/brlock.c


Changeset:
Modified: branches/SAMBA_3_0/source/locking/brlock.c
===================================================================
--- branches/SAMBA_3_0/source/locking/brlock.c	2004-10-17 00:20:57 UTC (rev 3007)
+++ branches/SAMBA_3_0/source/locking/brlock.c	2004-10-17 00:22:11 UTC (rev 3008)
@@ -563,7 +563,6 @@
 
 	dbuf.dptr = NULL;
 
-	tdb_chainlock(tdb, kbuf);
 	dbuf = tdb_fetch(tdb, kbuf);
 
 	lock.context.smbpid = smbpid;
@@ -594,12 +593,10 @@
 
 	/* no conflicts - we could have added it */
 	SAFE_FREE(dbuf.dptr);
-	tdb_chainunlock(tdb, kbuf);
 	return True;
 
  fail:
 	SAFE_FREE(dbuf.dptr);
-	tdb_chainunlock(tdb, kbuf);
 	return False;
 }
 



More information about the samba-cvs mailing list