xfs: move the xfs_can_free_eofblocks call under the IOLOCK
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:16 +0000 (14:38 -0700)
commit2b156ff8c82eed24d2b06520923856946143ba17
treec96e1a4e53fa857c8e3c223cafb12efa31a4d5e7
parentb2941046ea85d2cd94b485831bf03402f34f4060
xfs: move the xfs_can_free_eofblocks call under the IOLOCK

In xfs_inode_free_eofblocks, move the xfs_can_free_eofblocks call
further down in the function to the point where we have taken the
IOLOCK.  This is preparation for the next patch, where we will need that
lock (or equivalent) so that we can check if there are any post-eof
blocks to clean out.

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