diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2013-09-05 19:30:16 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-09-10 05:52:18 +0200 |
commit | 42873b0a282ac84a56e0e48c408beb62d0ad2917 (patch) | |
tree | 14891ca4e47ebfa0a3668b68772489e6bdd805d1 /fs/cifs/smb2misc.c | |
parent | CIFS: Add create lease v2 context for SMB3 (diff) | |
download | linux-42873b0a282ac84a56e0e48c408beb62d0ad2917.tar.xz linux-42873b0a282ac84a56e0e48c408beb62d0ad2917.zip |
CIFS: Respect epoch value from create lease context v2
that force a client to purge cache pages when a server requests it.
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r-- | fs/cifs/smb2misc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 4aa59b34ec23..fb3966265b6e 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -420,6 +420,7 @@ smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp, __u8 lease_state; struct list_head *tmp; struct cifsFileInfo *cfile; + struct TCP_Server_Info *server = tcon->ses->server; struct cifs_pending_open *open; struct cifsInodeInfo *cinode; int ack_req = le32_to_cpu(rsp->Flags & @@ -439,7 +440,7 @@ smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp, cifs_dbg(FYI, "lease key match, lease break 0x%d\n", le32_to_cpu(rsp->NewLeaseState)); - tcon->ses->server->ops->set_oplock_level(cinode, lease_state); + server->ops->set_oplock_level(cinode, lease_state, 0, NULL); if (ack_req) cfile->oplock_break_cancelled = false; @@ -575,7 +576,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server) cfile->oplock_break_cancelled = false; server->ops->set_oplock_level(cinode, - rsp->OplockLevel ? SMB2_OPLOCK_LEVEL_II : 0); + rsp->OplockLevel ? SMB2_OPLOCK_LEVEL_II : 0, + 0, NULL); queue_work(cifsiod_wq, &cfile->oplock_break); |