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

s3/smbd: update exclusive oplock optimisation to the lease area

This is similar to 9533a55ee5ffe430589dcea845851b84876ef656 but this
time in the contend_level2_oplocks_begin_default() function.

The idea of the optimisation is to avoid expensive db queries in
locking.tdb if we *know* we're the only open.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12766

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2017-04-20 21:37:37 +02:00
parent f631e95e2d
commit 0a4a08ad1c

View File

@ -1044,7 +1044,7 @@ static void contend_level2_oplocks_begin_default(files_struct *fsp,
* the shared memory area whilst doing this.
*/
if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
if (fsp_lease_type_is_exclusive(fsp)) {
/*
* There can't be any level2 oplocks, we're alone.
*/