vfio-mdev: Make mdev_device private and abstract interfaces
[linux-2.6-microblaze.git] / fs / ioctl.c
index c415668..cb9b029 100644 (file)
@@ -223,7 +223,11 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd,
 
        if (!src_file.file)
                return -EBADF;
-       ret = vfs_clone_file_range(src_file.file, off, dst_file, destoff, olen);
+       ret = -EXDEV;
+       if (src_file.file->f_path.mnt != dst_file->f_path.mnt)
+               goto fdput;
+       ret = do_clone_file_range(src_file.file, off, dst_file, destoff, olen);
+fdput:
        fdput(src_file);
        return ret;
 }