summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-12-06 18:24:33 +0100
committerSteve French <smfrench@gmail.com>2012-12-07 20:08:07 +0100
commit03eca704cfa426aebf6edcc0208536835c109a9f (patch)
tree8d7651f70979ca8b0bab080325eaac4ad00b766c /fs/cifs
parentCIFS: Do not permit write to a range mandatory locked with a read lock (diff)
downloadlinux-03eca704cfa426aebf6edcc0208536835c109a9f.tar.xz
linux-03eca704cfa426aebf6edcc0208536835c109a9f.zip
CIFS: Fix possible data coherency problem after oplock break to None
by using cifs_invalidate_mapping rather than invalidate_remote_inode in cifs_oplock_break - this invalidates all inode pages and resets fscache cookies. Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ebebbb2bc1fb..1b322d041f1e 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3554,7 +3554,7 @@ void cifs_oplock_break(struct work_struct *work)
if (cinode->clientCanCacheRead == 0) {
rc = filemap_fdatawait(inode->i_mapping);
mapping_set_error(inode->i_mapping, rc);
- invalidate_remote_inode(inode);
+ cifs_invalidate_mapping(inode);
}
cFYI(1, "Oplock flush inode %p rc %d", inode, rc);
}