Skip to content

Commit af8512c

Browse files
Darrick J. Wongcmaiolino
authored andcommitted
xfs: don't fail repairs on metadata files with no attr fork
Fix a minor bug where we fail repairs on metadata files that do not have attr forks because xrep_metadata_inode_subtype doesn't filter ENOENT. Cc: stable@vger.kernel.org # v6.8 Fixes: 5a8e07e ("xfs: repair the inode core and forks of a metadata inode") Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent f6f91d2 commit af8512c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/xfs/scrub/repair.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,11 @@ xrep_metadata_inode_forks(
10841084
return error;
10851085

10861086
/* Make sure the attr fork looks ok before we delete it. */
1087-
error = xrep_metadata_inode_subtype(sc, XFS_SCRUB_TYPE_BMBTA);
1088-
if (error)
1089-
return error;
1087+
if (xfs_inode_hasattr(sc->ip)) {
1088+
error = xrep_metadata_inode_subtype(sc, XFS_SCRUB_TYPE_BMBTA);
1089+
if (error)
1090+
return error;
1091+
}
10901092

10911093
/* Clear the reflink flag since metadata never shares. */
10921094
if (xfs_is_reflink_inode(sc->ip)) {

0 commit comments

Comments
 (0)