smbd: Set SHARE_MODE_HAS_READ_LEASE when downgrading an oplock
authorVolker Lendecke <vl@samba.org>
Sun, 30 Jun 2019 17:57:39 +0000 (19:57 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 4 Jul 2019 14:03:29 +0000 (14:03 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/locking/locking.c

index 86fd2ca190681163f49014598c628d61cb82d063..e173034165c9f6f5a11576df2f87333587b05f0d 100644 (file)
@@ -947,6 +947,7 @@ bool downgrade_share_oplock(struct share_mode_lock *lck, files_struct *fsp)
        }
 
        e->op_type = LEVEL_II_OPLOCK;
+       lck->data->flags |= SHARE_MODE_HAS_READ_LEASE;
        lck->data->modified = True;
        return True;
 }