On Mon, Dec 03, 2018 at 02:46:20PM +0200, Amir Goldstein wrote: > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > > > The man page says: > > > > EINVAL Requested range extends beyond the end of the source file > > > > But the current behaviour is that copy_file_range does a short > > copy up to the source file EOF. Fix the kernel behaviour to match > > the behaviour described in the man page. I think the behavior implemented is a lot more useful than the one documented.. > > + /* If the source range crosses EOF, fail the copy */ > > + if (pos_in >= i_size(inode_in) || pos_in + len > i_size(inode_in)) > > + return -EINVAL; > > + > > i_size_read()... > > Otherwise > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> Looks like this doesn't even compile?