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/smb2pdu.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/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 7 |
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: |