summaryrefslogtreecommitdiffstats
path: root/source3/locking/brlock.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-17 00:22:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:59 -0500
commitb0202c7b851bb15f856ba526857e8b2f7cfabfec (patch)
treead662e68bd900744a7ce57cbb7fa8249ed0c8cd3 /source3/locking/brlock.c
parent2efbc238d4f32e810f42393ea2f1f022030d97c5 (diff)
downloadsamba-b0202c7b851bb15f856ba526857e8b2f7cfabfec.tar.gz
samba-b0202c7b851bb15f856ba526857e8b2f7cfabfec.tar.xz
samba-b0202c7b851bb15f856ba526857e8b2f7cfabfec.zip
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)
Diffstat (limited to 'source3/locking/brlock.c')
-rw-r--r--source3/locking/brlock.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 990a6a25d2f..4c34bd7dfd9 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;
}