CIFS: Add SMB2.1 lease break support

Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Pavel Shilovsky
2012-09-19 06:22:45 -07:00
committed by Steve French
parent 25078105fb
commit 0822f51426
6 changed files with 157 additions and 14 deletions

View 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);