Skip to content

Commit 08e012a

Browse files
Jiapeng ChongChandan Babu R
authored andcommitted
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 <[email protected]> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8867 Signed-off-by: Jiapeng Chong <[email protected]> Reviewed-by: "Darrick J. Wong" <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
1 parent 4b0bf86 commit 08e012a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

fs/xfs/scrub/dir_repair.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -204,27 +204,6 @@ xrep_setup_directory(
204204
return 0;
205205
}
206206

207-
/*
208-
* If we're the root of a directory tree, we are our own parent. If we're an
209-
* unlinked directory, the parent /won't/ have a link to us. Set the parent
210-
* directory to the root for both cases. Returns NULLFSINO if we don't know
211-
* what to do.
212-
*/
213-
static inline xfs_ino_t
214-
xrep_dir_self_parent(
215-
struct xrep_dir *rd)
216-
{
217-
struct xfs_scrub *sc = rd->sc;
218-
219-
if (sc->ip->i_ino == sc->mp->m_sb.sb_rootino)
220-
return sc->mp->m_sb.sb_rootino;
221-
222-
if (VFS_I(sc->ip)->i_nlink == 0)
223-
return sc->mp->m_sb.sb_rootino;
224-
225-
return NULLFSINO;
226-
}
227-
228207
/*
229208
* Look up the dotdot entry and confirm that it's really the parent.
230209
* Returns NULLFSINO if we don't know what to do.

0 commit comments

Comments
 (0)