]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: remove the metadir root creation case in xfs_imeta_dir_create
authorChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 05:33:33 +0000 (07:33 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 12 Apr 2024 06:00:43 +0000 (08:00 +0200)
Source kernel commit: e2661d07c7e38c1739a5758a53eaf2bee42b2ca8

This code is only used by mkfs, where it will be reimplemented in the
xfsprogs patches.

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

index a31d9c8796fdb317df202289120554d671ba88d4..da4b64617899faa4f4f372308d14e4c1124faeac 100644 (file)
@@ -564,18 +564,6 @@ xfs_imeta_dir_create(
        int                             error;
 
        xfs_assert_ilocked(upd->dp, XFS_ILOCK_EXCL);
-
-       /* metadir ino is recorded in superblock; only mkfs gets to do this */
-       if (xfs_imeta_path_compare(upd->path, &XFS_IMETA_METADIR)) {
-               error = xfs_imeta_sb_create(upd, mode);
-               if (error)
-                       return error;
-
-               /* Set the metadata iflag, initialize directory. */
-               xfs_imeta_set_iflag(upd->tp, upd->ip);
-               return xfs_dir_init(upd->tp, upd->ip, upd->ip);
-       }
-
        ASSERT(upd->path->im_depth > 0);
 
        xfs_icreate_args_rootfile(&args, mp, mode, xfs_has_parent(mp));