CIFS: Add SMB2.1 lease break support
[cascardo/linux.git] / fs / cifs / smb2file.c
index 78fb205..a93eec3 100644 (file)
@@ -38,6 +38,8 @@ void
 smb2_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)
 {
        oplock &= 0xFF;
+       if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
+               return;
        if (oplock == SMB2_OPLOCK_LEVEL_EXCLUSIVE) {
                cinode->clientCanCacheAll = true;
                cinode->clientCanCacheRead = true;