Merge tag 'copy-file-range-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-block.git] / fs / cifs / cifsfs.c
index 72db1c89bf5aa999b7bc615b08d2855a57d7ae45..24635b65effa7848005c815a955ea029270c6f5f 100644 (file)
@@ -1149,6 +1149,10 @@ static ssize_t cifs_copy_file_range(struct file *src_file, loff_t off,
        rc = cifs_file_copychunk_range(xid, src_file, off, dst_file, destoff,
                                        len, flags);
        free_xid(xid);
+
+       if (rc == -EOPNOTSUPP || rc == -EXDEV)
+               rc = generic_copy_file_range(src_file, off, dst_file,
+                                            destoff, len, flags);
        return rc;
 }