diff options
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
| -rw-r--r-- | fs/xfs/xfs_bmap_util.c | 14 | 
1 files changed, 6 insertions, 8 deletions
| diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 73a36b7be3bd..d4a387d3d0ce 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -771,8 +771,7 @@ int  xfs_alloc_file_space(  	struct xfs_inode	*ip,  	xfs_off_t		offset, -	xfs_off_t		len, -	int			alloc_type) +	xfs_off_t		len)  {  	xfs_mount_t		*mp = ip->i_mount;  	xfs_off_t		count; @@ -865,8 +864,8 @@ xfs_alloc_file_space(  			goto error;  		error = xfs_bmapi_write(tp, ip, startoffset_fsb, -					allocatesize_fsb, alloc_type, 0, imapp, -					&nimaps); +				allocatesize_fsb, XFS_BMAPI_PREALLOC, 0, imapp, +				&nimaps);  		if (error)  			goto error; @@ -1001,7 +1000,7 @@ xfs_free_file_space(  	/*  	 * Now that we've unmap all full blocks we'll have to zero out any -	 * partial block at the beginning and/or end.  iomap_zero_range is smart +	 * partial block at the beginning and/or end.  xfs_zero_range is smart  	 * enough to skip any holes, including those we just created, but we  	 * must take care not to zero beyond EOF and enlarge i_size.  	 */ @@ -1009,15 +1008,14 @@ xfs_free_file_space(  		return 0;  	if (offset + len > XFS_ISIZE(ip))  		len = XFS_ISIZE(ip) - offset; -	error = iomap_zero_range(VFS_I(ip), offset, len, NULL, -			&xfs_buffered_write_iomap_ops); +	error = xfs_zero_range(ip, offset, len, NULL);  	if (error)  		return error;  	/*  	 * If we zeroed right up to EOF and EOF straddles a page boundary we  	 * must make sure that the post-EOF area is also zeroed because the -	 * page could be mmap'd and iomap_zero_range doesn't do that for us. +	 * page could be mmap'd and xfs_zero_range doesn't do that for us.  	 * Writeback of the eof page will do this, albeit clumsily.  	 */  	if (offset + len >= XFS_ISIZE(ip) && offset_in_page(offset + len) > 0) { |