diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-09-09 23:00:31 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-09-15 10:09:57 +0200 |
| commit | bb991b7f79dd34cc5f24db0f736bf75630c970e7 (patch) | |
| tree | 8ea7ed1f749ea4fc6c309e84311ce05c0a501074 | |
| parent | afbccf99f7f82117cba9ad4b0b006692030f49e8 (diff) | |
| download | linux-next-bb991b7f79dd34cc5f24db0f736bf75630c970e7.tar.gz linux-next-bb991b7f79dd34cc5f24db0f736bf75630c970e7.zip | |
xfs: fix attr fork block count checks in xrep_inode_blockcounts
LOLLM points out that a file has an attr fork, it will call
xchk_inode_count_blocks to set @ablocks to the number of fsblocks mapped
by the attr fork; but then it'll compare @blocks (aka the count of
fsblocks mapped by the data fork). We already checked that and we never
do anything with @acount, so I think this is clearly a bug. Fix the
comparison.
Cc: stable@vger.kernel.org # v6.8
Fixes: 2d295fe65776d1 ("xfs: repair inode records")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
| -rw-r--r-- | fs/xfs/scrub/inode_repair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c index 8bc508336aa5..b87c22146233 100644 --- a/fs/xfs/scrub/inode_repair.c +++ b/fs/xfs/scrub/inode_repair.c @@ -1702,7 +1702,7 @@ xrep_inode_blockcounts( &acount); if (error) return error; - if (count >= sc->mp->m_sb.sb_dblocks) + if (acount >= sc->mp->m_sb.sb_dblocks) return -EFSCORRUPTED; error = xrep_ino_ensure_extent_count(sc, XFS_ATTR_FORK, nextents); |
