WIP: merge_config
[platform/kernel/linux-starfive.git] / fs / ioctl.c
index 1ed097e..80ac36a 100644 (file)
@@ -173,7 +173,7 @@ int fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo,
 
        if (*len == 0)
                return -EINVAL;
-       if (start > maxbytes)
+       if (start >= maxbytes)
                return -EFBIG;
 
        /*
@@ -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;
 }