summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-08-23 16:07:28 +0300
committerSteve French <stfrench@microsoft.com>2022-08-29 06:34:07 +0300
commitc3a72bb213209adfe981a4a92ea5746a778323e4 (patch)
tree3e441c05d639f49bfe976eb87bf5c6f386dfd131 /fs/cifs/cifsfs.c
parentb90cb1053190353cc30f0fef0ef1f378ccc063c5 (diff)
downloadlinux-c3a72bb213209adfe981a4a92ea5746a778323e4.tar.xz
smb3: Move the flush out of smb2_copychunk_range() into its callers
Move the flush out of smb2_copychunk_range() into its callers. This will allow the pagecache to be invalidated between the flush and the operation in smb3_collapse_range() and smb3_insert_range(). Signed-off-by: David Howells <dhowells@redhat.com> cc: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index f54d8bf2732a..e9fb338b8e7e 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1219,6 +1219,8 @@ ssize_t cifs_file_copychunk_range(unsigned int xid,
cifs_dbg(FYI, "copychunk range\n");
+ filemap_write_and_wait(src_inode->i_mapping);
+
if (!src_file->private_data || !dst_file->private_data) {
rc = -EBADF;
cifs_dbg(VFS, "missing cifsFileInfo on copy range src file\n");