summaryrefslogtreecommitdiff
path: root/fs/cifs/file.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-09 22:52:18 -0500
commit42873b0a282ac84a56e0e48c408beb62d0ad2917 (patch)
tree14891ca4e47ebfa0a3668b68772489e6bdd805d1 /fs/cifs/file.c
parentf047390a097e907ccccf8aa894dec49890578a1a (diff)
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.c4
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;
}