mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
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: a9600db96f ("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>
This commit is contained in:
parent
7aa67044e7
commit
270ffcd9b0
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user