aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 27cad84dab23..189df668b6a0 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1931,10 +1931,17 @@ static ssize_t ceph_copy_file_range(struct file *src_file, loff_t src_off,
1931 if (!prealloc_cf) 1931 if (!prealloc_cf)
1932 return -ENOMEM; 1932 return -ENOMEM;
1933 1933
1934 /* Start by sync'ing the source file */ 1934 /* Start by sync'ing the source and destination files */
1935 ret = file_write_and_wait_range(src_file, src_off, (src_off + len)); 1935 ret = file_write_and_wait_range(src_file, src_off, (src_off + len));
1936 if (ret < 0) 1936 if (ret < 0) {
1937 dout("failed to write src file (%zd)\n", ret);
1938 goto out;
1939 }
1940 ret = file_write_and_wait_range(dst_file, dst_off, (dst_off + len));
1941 if (ret < 0) {
1942 dout("failed to write dst file (%zd)\n", ret);
1937 goto out; 1943 goto out;
1944 }
1938 1945
1939 /* 1946 /*
1940 * We need FILE_WR caps for dst_ci and FILE_RD for src_ci as other 1947 * We need FILE_WR caps for dst_ci and FILE_RD for src_ci as other