xfs: move xfs_iomap_write_allocate to xfs_aops.c
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Feb 2019 16:02:49 +0000 (08:02 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 17 Feb 2019 19:55:54 +0000 (11:55 -0800)
commit4ad765edb02a5333ce2fade642f116a67a3370ca
treef05f756dd7f11aba4a52217965895a0581528d2d
parent125851ac92d62b966df851c6f34147121020af2f
xfs: move xfs_iomap_write_allocate to xfs_aops.c

This function is a small wrapper only used by the writeback code, so
move it together with the writeback code and simplify it down to the
glorified do { } while loop that is now is.

A few bits intentionally got lost here: no need to call xfs_qm_dqattach
because quotas are always attached when we create the delalloc
reservation, and no need for the imap->br_startblock == 0 check given
that xfs_bmapi_convert_delalloc already has a WARN_ON_ONCE for exactly
that condition.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_aops.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_iomap.h