diff options
author | Volker Lendecke <vl@samba.org> | 2019-08-09 16:27:48 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-09-17 22:49:39 +0000 |
commit | ac85ec5ed855d8d0bc2564cbd33a580a8db6818e (patch) | |
tree | 81743e5b756d031c0de3b6d2fbf60f2084e6fe3c /source3/locking | |
parent | 86b4907853e8df20ebe3ec6871aa3210f1bde201 (diff) | |
download | samba-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/locking')
-rw-r--r-- | source3/locking/share_mode_lock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 3c91a25948d..abd911f4be2 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -275,7 +275,7 @@ bool file_has_read_lease(struct files_struct *fsp) return true; } - return (fsp->share_mode_flags & SHARE_MODE_HAS_READ_LEASE) != 0; + return (fsp->share_mode_flags & SHARE_MODE_LEASE_READ) != 0; } static int share_mode_data_nofree_destructor(struct share_mode_data *d) @@ -2005,7 +2005,7 @@ bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp) return false; } - lck->data->flags |= SHARE_MODE_HAS_READ_LEASE; + lck->data->flags |= SHARE_MODE_LEASE_READ; lck->data->modified = true; return true; |