diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-19 17:22:45 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-25 06:46:33 +0400 |
commit | 0822f51426b51bd599b3a7e972b14aacaa045a92 (patch) | |
tree | c11376ec62881566a6ca9e1f7ef85881fc961599 /fs/cifs/smb2ops.c | |
parent | 25078105fbe14e7b3270391eaa11514bec787a52 (diff) | |
download | linux-0822f51426b51bd599b3a7e972b14aacaa045a92.tar.xz |
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.c | 4 |
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); |