mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
smbd: Set SHARE_MODE_HAS_READ_LEASE when granting a read lease
Lazy update of the flag: Whenever we add a read lease, we have to set the flag. Nobody except contend_level2_oplocks_begin will remove that flag again, as this would mean a full lease traverse when removing one. And contend_level2_oplocks_begin traverses the leases anyway Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
0d4c4e045e
commit
ffd098d8bb
@ -2355,6 +2355,10 @@ static NTSTATUS grant_fsp_oplock_type(struct smb_request *req,
|
|||||||
return NT_STATUS_NO_MEMORY;
|
return NT_STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (granted & SMB2_LEASE_READ) {
|
||||||
|
lck->data->flags |= SHARE_MODE_HAS_READ_LEASE;
|
||||||
|
}
|
||||||
|
|
||||||
ok = update_num_read_oplocks(fsp, lck);
|
ok = update_num_read_oplocks(fsp, lck);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
del_share_mode(lck, fsp);
|
del_share_mode(lck, fsp);
|
||||||
|
Loading…
Reference in New Issue
Block a user