diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-07-20 20:23:46 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-07-22 15:06:24 +0200 |
| commit | 270ffcd9b0a46254fbf3079d0e3341db7d7ec0e6 (patch) | |
| tree | 90c5a13b4180dc2d90e504998eeca75ac7dc68b5 | |
| parent | 7aa67044e7d8b6eebc44b25745f16c83ccc40a94 (diff) | |
| download | linux-270ffcd9b0a46254fbf3079d0e3341db7d7ec0e6.tar.gz linux-270ffcd9b0a46254fbf3079d0e3341db7d7ec0e6.zip | |
xfs: check cowextsize in xrep_inode_cowextsize
LOLLM points out that the function that corrects cowextsize should check
i_cowextsize, not i_extsize.
Cc: stable@vger.kernel.org # v6.14
Fixes: a9600db96f74af ("xfs: detect and repair misaligned rtinherit directory cowextsize hints")
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 3ec41c198351..b88427a4460c 100644 --- a/fs/xfs/scrub/inode_repair.c +++ b/fs/xfs/scrub/inode_repair.c @@ -1960,7 +1960,7 @@ xrep_inode_cowextsize( /* Fix misaligned CoW extent size hints on a directory. */ if ((sc->ip->i_diflags & XFS_DIFLAG_RTINHERIT) && (sc->ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE) && - sc->ip->i_extsize % sc->mp->m_sb.sb_rextsize > 0) { + xfs_extlen_to_rtxmod(sc->mp, sc->ip->i_cowextsize) > 0) { sc->ip->i_cowextsize = 0; sc->ip->i_diflags2 &= ~XFS_DIFLAG2_COWEXTSIZE; } |
