CIFS: Add SMB2.1 lease break support
[deliverable/linux.git] / fs / cifs / smb2ops.c
index 360d9079af499277a9ad3d920c5ba58b51768946..630156f98cc70489b55065e1ca140601cd9a31d5 100644 (file)
@@ -513,6 +513,10 @@ static int
 smb2_oplock_response(struct cifs_tcon *tcon, struct cifs_fid *fid,
                     struct cifsInodeInfo *cinode)
 {
+       if (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LEASING)
+               return SMB2_lease_break(0, tcon, cinode->lease_key,
+                                       smb2_get_lease_state(cinode));
+
        return SMB2_oplock_break(0, tcon, fid->persistent_fid,
                                 fid->volatile_fid,
                                 cinode->clientCanCacheRead ? 1 : 0);
This page took 0.026167 seconds and 5 git commands to generate.