diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-10-17 20:58:10 +0200 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2024-10-22 13:37:18 +0200 |
commit | af8512c5277d17aae09be5305daa9118d2fa8881 (patch) | |
tree | 90d8aed2df2b221ca838b34ae6b9f221eea8aeb0 /fs | |
parent | xfs: punch delalloc extents from the COW fork for COW writes (diff) | |
download | linux-af8512c5277d17aae09be5305daa9118d2fa8881.tar.xz linux-af8512c5277d17aae09be5305daa9118d2fa8881.zip |
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: 5a8e07e799721b ("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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/scrub/repair.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 67478294f11a..155bbaaa496e 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -1084,9 +1084,11 @@ xrep_metadata_inode_forks( return error; /* Make sure the attr fork looks ok before we delete it. */ - error = xrep_metadata_inode_subtype(sc, XFS_SCRUB_TYPE_BMBTA); - if (error) - return error; + 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)) { |