summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-03-11 13:42:55 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-03-18 15:20:19 -0700
commitd13b21d29774fb6d831c0672e3d2f732ac72eb6d (patch)
tree996b03abc4ad30b4ef4b02a95cde57704747db99
parentf12a62e1c4599bb8de5179d616eabe99303977ce (diff)
xfs: reduce indirect calls in xfs_inode_walk{,_ag}
Since the previous patch requires the forward static declaration of xfs_blockgc_scan_inode, we can eliminate an indirect call from the body of xfs_inode_walk_ag for a (probably minor) decrease in overhead. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--fs/xfs/xfs_icache.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 6924125a3c53..9198c7a7c3ca 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -858,8 +858,20 @@ restart:
if ((iter_flags & XFS_INODE_WALK_INEW_WAIT) &&
xfs_iflags_test(batch[i], XFS_INEW))
xfs_inew_wait(batch[i]);
- error = execute(batch[i], args);
- xfs_irele(batch[i]);
+ switch (tag) {
+ case XFS_ICI_BLOCKGC_TAG:
+ error = xfs_blockgc_scan_inode(batch[i], args);
+ xfs_irele(batch[i]);
+ break;
+ case XFS_ICI_NO_TAG:
+ error = execute(batch[i], args);
+ xfs_irele(batch[i]);
+ break;
+ default:
+ ASSERT(0);
+ error = -EFSCORRUPTED;
+ break;
+ }
if (error == -EAGAIN) {
skipped++;
continue;