svn commit: samba r3048 - in trunk/source/locking: .

jra at samba.org jra at samba.org
Mon Oct 18 17:17:28 GMT 2004


Author: jra
Date: 2004-10-18 17:17:27 +0000 (Mon, 18 Oct 2004)
New Revision: 3048

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

Log:
Fix from tridge :

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

Jeremy.

Modified:
   trunk/source/locking/brlock.c


Changeset:
Modified: trunk/source/locking/brlock.c
===================================================================
--- trunk/source/locking/brlock.c	2004-10-18 16:25:36 UTC (rev 3047)
+++ trunk/source/locking/brlock.c	2004-10-18 17:17:27 UTC (rev 3048)
@@ -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