xfs: simplify the xfs_iomap_write_direct calling
authorChristoph Hellwig <hch@lst.de>
Wed, 30 Oct 2019 19:24:59 +0000 (12:24 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 3 Nov 2019 18:22:30 +0000 (10:22 -0800)
commite696663a97e89f88d085ff84b8a373989ae613b1
tree89b73dd4b10dddb2198ff318f86b7264a697caf0
parent307cdb54b80e036978b7b717abcbcfdac0b34e38
xfs: simplify the xfs_iomap_write_direct calling

Move the EOF alignment and checking for the next allocated extent into
the callers to avoid the need to pass the byte based offset and count
as well as looking at the incoming imap.  The added benefit is that
the caller can unlock the incoming ilock and the function doesn't have
funny unbalanced locking contexts.

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_iomap.c
fs/xfs/xfs_iomap.h
fs/xfs/xfs_pnfs.c