diff options
author | Pavel Shilovsky | 2013-09-05 19:30:16 +0200 |
---|---|---|
committer | Steve French | 2013-09-10 05:52:18 +0200 |
commit | 42873b0a282ac84a56e0e48c408beb62d0ad2917 (patch) | |
tree | 14891ca4e47ebfa0a3668b68772489e6bdd805d1 /fs/cifs/file.c | |
parent | CIFS: Add create lease v2 context for SMB3 (diff) | |
download | kernel-qcow2-linux-42873b0a282ac84a56e0e48c408beb62d0ad2917.tar.gz kernel-qcow2-linux-42873b0a282ac84a56e0e48c408beb62d0ad2917.tar.xz kernel-qcow2-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/file.c')
-rw-r--r-- | fs/cifs/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 188b2470b1fb..d044b35ce228 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -323,6 +323,7 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, oplock = fid->pending_open->oplock; list_del(&fid->pending_open->olist); + fid->purge_cache = false; server->ops->set_fid(cfile, fid, oplock); list_add(&cfile->tlist, &tcon->openFileList); @@ -333,6 +334,9 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, list_add_tail(&cfile->flist, &cinode->openFileList); spin_unlock(&cifs_file_list_lock); + if (fid->purge_cache) + cifs_invalidate_mapping(inode); + file->private_data = cfile; return cfile; } |