From bd6fcec3f813175c6bbb19dfde7de681597f0a00 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 12 Apr 2024 07:14:03 +0200 Subject: [PATCH] xfs: remove xfs_imeta_sb_lookup Source kernel commit: 5617a631fd85927dd845da0e39659b1bc33897ed It is only used for the metadir root, which can be open coded. Signed-off-by: Christoph Hellwig --- libxfs/xfs_imeta.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/libxfs/xfs_imeta.c b/libxfs/xfs_imeta.c index 38cf797d4..0b253069c 100644 --- a/libxfs/xfs_imeta.c +++ b/libxfs/xfs_imeta.c @@ -167,24 +167,6 @@ xfs_imeta_path_to_sb_inop( return NULL; } -/* Look up a superblock metadata inode by its path. */ -STATIC int -xfs_imeta_sb_lookup( - struct xfs_mount *mp, - const struct xfs_imeta_path *path, - xfs_ino_t *inop) -{ - xfs_ino_t *sb_inop; - - sb_inop = xfs_imeta_path_to_sb_inop(mp, path); - if (!sb_inop) - return -EINVAL; - - trace_xfs_imeta_sb_lookup(mp, sb_inop); - *inop = *sb_inop; - return 0; -} - /* Update inode pointers in the superblock. */ static inline void xfs_imeta_log_sb( @@ -516,7 +498,7 @@ xfs_imeta_dir_lookup_int( /* metadir ino is recorded in superblock */ if (xfs_imeta_path_compare(path, &XFS_IMETA_METADIR)) - return xfs_imeta_sb_lookup(tp->t_mountp, path, inop); + return tp->t_mountp->m_sb.sb_metadirino; ASSERT(path->im_depth > 0); -- 2.50.1