summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2024-04-24 05:06:38 +0300
committerChandan Babu R <chandanbabu@kernel.org>2024-04-24 10:04:44 +0300
commit08e012a62de877e77d7d44d5bddace63d760741b (patch)
tree60f8ee70d5f62ee0e26c0405f9cd1ef20625322d /fs/xfs
parent4b0bf86c179775c882fed7ff5db4a147b3f7f94a (diff)
downloadlinux-08e012a62de877e77d7d44d5bddace63d760741b.tar.xz
xfs: Remove unused function xrep_dir_self_parent
The function are defined in the dir_repair.c file, but not called elsewhere, so delete the unused function. fs/xfs/scrub/dir_repair.c:186:1: warning: unused function 'xrep_dir_self_parent'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8867 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/scrub/dir_repair.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/fs/xfs/scrub/dir_repair.c b/fs/xfs/scrub/dir_repair.c
index 6ad40f8aafb8..fa1a9954d48d 100644
--- a/fs/xfs/scrub/dir_repair.c
+++ b/fs/xfs/scrub/dir_repair.c
@@ -205,27 +205,6 @@ xrep_setup_directory(
}
/*
- * If we're the root of a directory tree, we are our own parent. If we're an
- * unlinked directory, the parent /won't/ have a link to us. Set the parent
- * directory to the root for both cases. Returns NULLFSINO if we don't know
- * what to do.
- */
-static inline xfs_ino_t
-xrep_dir_self_parent(
- struct xrep_dir *rd)
-{
- struct xfs_scrub *sc = rd->sc;
-
- if (sc->ip->i_ino == sc->mp->m_sb.sb_rootino)
- return sc->mp->m_sb.sb_rootino;
-
- if (VFS_I(sc->ip)->i_nlink == 0)
- return sc->mp->m_sb.sb_rootino;
-
- return NULLFSINO;
-}
-
-/*
* Look up the dotdot entry and confirm that it's really the parent.
* Returns NULLFSINO if we don't know what to do.
*/