xfs: refactor xfs_bmap_add_extent_unwritten_real
authorChristoph Hellwig <hch@lst.de>
Tue, 17 Oct 2017 21:16:25 +0000 (14:16 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:22 +0000 (15:38 -0700)
commit79fa6143a939a6b50d1d9dc736336e57d06b849d
treec54ad557206008a8ddb07a8df779cb97bfc1653b
parentca1862b0838604aa048120d87ebbf53cf7c8c8bd
xfs: refactor xfs_bmap_add_extent_unwritten_real

Use xfs_iext_get_extent to find, and xfs_iext_update_extent to update
entries in the in-core extent list.  This isolates the function from
the detailed layout of the extent list, and generally makes the code
a lot more readable.

Also get rid of the oldext and newext variables as using the extent
records is a lot more descriptive.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_bmap.c