From b0202c7b851bb15f856ba526857e8b2f7cfabfec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 17 Oct 2004 00:22:11 +0000 Subject: r3008: 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 (This used to be commit 78e904c27b31d7123b521c446247d6ff558c84cc) --- source3/locking/brlock.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'source3/locking') diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 990a6a25d2..4c34bd7dfd 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -563,7 +563,6 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, dbuf.dptr = NULL; - tdb_chainlock(tdb, kbuf); dbuf = tdb_fetch(tdb, kbuf); lock.context.smbpid = smbpid; @@ -594,12 +593,10 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, /* 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; } -- cgit