1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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 commit is contained in:
Andrew Tridgell 2004-10-17 00:22:11 +00:00 committed by Gerald (Jerry) Carter
parent 6ae417f12c
commit 78e904c27b

View File

@ -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;
}