]> asedeno.scripts.mit.edu Git - linux.git/commit
vfs: vfs_clone_file_prep_inodes should return EINVAL for a clone from beyond EOF
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Oct 2018 23:40:22 +0000 (10:40 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Oct 2018 23:40:22 +0000 (10:40 +1100)
commit5b49f64db299d0b3f7c2170088186aa593d0be7d
treeed7559be897c3e12da7719f6d278e29528d3af90
parent84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d
vfs: vfs_clone_file_prep_inodes should return EINVAL for a clone from beyond EOF

vfs_clone_file_prep_inodes cannot return 0 if it is asked to remap from
a zero byte file because that's what btrfs does.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/read_write.c