summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-19 06:22:45 -0700
committerSteve French <smfrench@gmail.com>2012-09-24 21:46:33 -0500
commit0822f51426b51bd599b3a7e972b14aacaa045a92 (patch)
treec11376ec62881566a6ca9e1f7ef85881fc961599 /fs/cifs/smb2ops.c
parent25078105fbe14e7b3270391eaa11514bec787a52 (diff)
CIFS: Add SMB2.1 lease break support
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 360d9079af49..630156f98cc7 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -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);