--- git/misc/create_inode.c 2020-02-11 14:26:02.304002913 +0530 +++ git_mod/misc/create_inode.c 2020-02-12 16:07:23.164565131 +0530 @@ -392,7 +392,7 @@ } #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */ -static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, +static errcode_t copy_file_chunk(ext2_filsys fs, int fd, ext2_file_t e2_file, off_t start, off_t end, char *buf, char *zerobuf) { @@ -466,7 +466,7 @@ data_blk = data & ~(fs->blocksize - 1); hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1); - err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, + err = copy_file_chunk(fs, fd, e2_file, data_blk, hole_blk, buf, zerobuf); if (err) return err; @@ -518,7 +518,7 @@ } for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents; i++, ext++) { - err = copy_file_range(fs, fd, e2_file, ext->fe_logical, + err = copy_file_chunk(fs, fd, e2_file, ext->fe_logical, ext->fe_logical + ext->fe_length, buf, zerobuf); if (err) @@ -569,7 +569,7 @@ if (err != EXT2_ET_UNIMPLEMENTED) goto out; - err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, + err = copy_file_chunk(fs, fd, e2_file, 0, statbuf->st_size, buf, zerobuf); out: ext2fs_free_mem(&zerobuf);