xfs: move the check for post-EOF mappings into xfs_can_free_eofblocks
authorDarrick J. Wong <djwong@kernel.org>
Tue, 23 Mar 2021 23:59:31 +0000 (16:59 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 7 Apr 2021 21:38:21 +0000 (14:38 -0700)
commit7d88329e5b0fe636e63e2b1f078696bc85780442
tree5555d8aeb2fc81fbdbdb21ed60a2eff70474cf8c
parent2b156ff8c82eed24d2b06520923856946143ba17
xfs: move the check for post-EOF mappings into xfs_can_free_eofblocks

Fix the weird split of responsibilities between xfs_can_free_eofblocks
and xfs_free_eofblocks by moving the chunk of code that looks for any
actual post-EOF space mappings from the second function into the first.

This clears the way for deferred inode inactivation to be able to decide
if an inode needs inactivation work before committing the released inode
to the inactivation code paths (vs. marking it for reclaim).

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_inode.c