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>
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);
if (!ok) {
del_share_mode(lck, fsp);