summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-08-09 16:27:48 +0200
committerJeremy Allison <jra@samba.org>2019-09-17 22:49:39 +0000
commitac85ec5ed855d8d0bc2564cbd33a580a8db6818e (patch)
tree81743e5b756d031c0de3b6d2fbf60f2084e6fe3c /source3/smbd
parent86b4907853e8df20ebe3ec6871aa3210f1bde201 (diff)
downloadsamba-ac85ec5ed855d8d0bc2564cbd33a580a8db6818e.tar.gz
smbd: Add share mode flags
This will contain a summary of the "most restrictive" share mode and lease, i.e. intersection of all share_access entries and the union of all access_mask and leases in the share mode array. This way open_mode_check in the non-conflicting case will only have to look at the summary and not walk the share mode array. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c2
-rw-r--r--source3/smbd/oplock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index d9146f0582d..bb497adbd69 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2417,7 +2417,7 @@ grant:
}
if (granted & SMB2_LEASE_READ) {
- lck->data->flags |= SHARE_MODE_HAS_READ_LEASE;
+ lck->data->flags |= SHARE_MODE_LEASE_READ;
}
DBG_DEBUG("oplock type 0x%x on file %s\n",
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 44aeaf48a63..b3da84b1269 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -1319,7 +1319,7 @@ static void contend_level2_oplocks_begin_default(files_struct *fsp,
* Lazy update here. It might be that the read lease
* has gone in the meantime.
*/
- d->flags &= ~SHARE_MODE_HAS_READ_LEASE;
+ d->flags &= ~SHARE_MODE_LEASE_READ;
d->modified = true;
}