summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2013-09-05 21:30:16 +0400
committerSteve French <smfrench@gmail.com>2013-09-10 07:52:18 +0400
commit42873b0a282ac84a56e0e48c408beb62d0ad2917 (patch)
tree14891ca4e47ebfa0a3668b68772489e6bdd805d1 /fs/cifs/smb2pdu.c
parentf047390a097e907ccccf8aa894dec49890578a1a (diff)
downloadlinux-42873b0a282ac84a56e0e48c408beb62d0ad2917.tar.xz
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/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 6eef8b67e709..eba0efde66d7 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -903,7 +903,8 @@ create_reconnect_durable_buf(struct cifs_fid *fid)
}
static __u8
-parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp)
+parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp,
+ unsigned int *epoch)
{
char *data_offset;
struct create_context *cc;
@@ -920,7 +921,7 @@ parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp)
next = le32_to_cpu(cc->Next);
continue;
}
- return server->ops->parse_lease_buf(cc);
+ return server->ops->parse_lease_buf(cc, epoch);
} while (next != 0);
return 0;
@@ -1102,7 +1103,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
}
if (rsp->OplockLevel == SMB2_OPLOCK_LEVEL_LEASE)
- *oplock = parse_lease_state(server, rsp);
+ *oplock = parse_lease_state(server, rsp, &oparms->fid->epoch);
else
*oplock = rsp->OplockLevel;
creat_exit: