Commit af8512c5 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Carlos Maiolino
Browse files

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: 5a8e07e7 ("xfs: repair the inode core and forks of a metadata inode")
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent f6f91d29
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1084,9 +1084,11 @@ xrep_metadata_inode_forks(
		return error;

	/* Make sure the attr fork looks ok before we delete it. */
	if (xfs_inode_hasattr(sc->ip)) {
		error = xrep_metadata_inode_subtype(sc, XFS_SCRUB_TYPE_BMBTA);
		if (error)
			return error;
	}

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