xfs: make the icwalk processing functions clean up the grab state
authorDarrick J. Wong <djwong@kernel.org>
Mon, 31 May 2021 18:32:00 +0000 (11:32 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 3 Jun 2021 22:56:03 +0000 (15:56 -0700)
commit594ab00b760f1722b800c45d37adc21eecf42dc1
tree50d22c6e5f2e8bb5c20663ecc718f6da6dc47cd8
parentd20d5edcf941e70e03cdbda2f8df93e3969c31a2
xfs: make the icwalk processing functions clean up the grab state

Soon we're going to be adding two new callers to the incore inode walk
code: reclaim of incore inodes, and (later) inactivation of inodes.
Both states operate on inodes that no longer have any VFS state, so we
need to move the xfs_irele calls into the processing functions.

In other words, icwalk processing functions are responsible for cleaning
up whatever state changes are made by the corresponding icwalk igrab
function that picked the inode for processing.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_icache.c