Merge tag 'vfs-5.18-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-microblaze.git] / fs / ioctl.c
index 85f7e4e..80ac36a 100644 (file)
@@ -236,9 +236,6 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd,
 
        if (!src_file.file)
                return -EBADF;
-       ret = -EXDEV;
-       if (src_file.file->f_path.mnt != dst_file->f_path.mnt)
-               goto fdput;
        cloned = vfs_clone_file_range(src_file.file, off, dst_file, destoff,
                                      olen, 0);
        if (cloned < 0)
@@ -247,7 +244,6 @@ static long ioctl_file_clone(struct file *dst_file, unsigned long srcfd,
                ret = -EINVAL;
        else
                ret = 0;
-fdput:
        fdput(src_file);
        return ret;
 }