]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: remove xfs_imeta_sb_lookup
authorChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 05:14:03 +0000 (07:14 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 06:00:43 +0000 (08:00 +0200)
Source kernel commit: 5617a631fd85927dd845da0e39659b1bc33897ed

It is only used for the metadir root, which can be open coded.

Signed-off-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_imeta.c

index 38cf797d4442505f82c51076d7767bcb6cd5371c..0b253069c4a1bf0e49c11dc04d1589d724969bb5 100644 (file)
@@ -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);