mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
Revert "s3: locking: Update oplock optimization for the leases era !"
This reverts commit 2e00feb278e174fd28d003c4d5a576f91c0bd7d0. This should not have been in 4-4-test, see https://bugzilla.samba.org/show_bug.cgi?id=12628#c6 v4-4-test is in the security fixes only mode. This also introduces a regression that's fixed in v4-5 and higer only, see https://bugzilla.samba.org/show_bug.cgi?id=12798 Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
a709729657
commit
8d23e3321d
@ -118,21 +118,17 @@ bool strict_lock_default(files_struct *fsp, struct lock_struct *plock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strict_locking == Auto) {
|
if (strict_locking == Auto) {
|
||||||
uint32_t lease_type = fsp_lease_type(fsp);
|
if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) &&
|
||||||
|
(plock->lock_type == READ_LOCK ||
|
||||||
if ((lease_type & SMB2_LEASE_READ) &&
|
plock->lock_type == WRITE_LOCK)) {
|
||||||
(plock->lock_type == READ_LOCK))
|
DEBUG(10, ("is_locked: optimisation - exclusive oplock "
|
||||||
{
|
"on file %s\n", fsp_str_dbg(fsp)));
|
||||||
DBG_DEBUG("optimisation - read lease on file %s\n",
|
|
||||||
fsp_str_dbg(fsp));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ((fsp->oplock_type == LEVEL_II_OPLOCK) &&
|
||||||
if ((lease_type & SMB2_LEASE_WRITE) &&
|
(plock->lock_type == READ_LOCK)) {
|
||||||
(plock->lock_type == WRITE_LOCK))
|
DEBUG(10, ("is_locked: optimisation - level II oplock "
|
||||||
{
|
"on file %s\n", fsp_str_dbg(fsp)));
|
||||||
DBG_DEBUG("optimisation - write lease on file %s\n",
|
|
||||||
fsp_str_dbg(fsp));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user