7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Darrick J. Wong commit 147f9f8300cb284923e08bb8a7b32ba9681c45ed upstream. LOLLM notices that for non-reflink realtime files, the @count output of xchk_inode_count_blocks includes both the file blocks on the realtime volume and the bmap btree blocks on the data volume. Therefore, we must compare this value to rblocks + dblocks to avoid unnecessary failure. Cc: stable@vger.kernel.org # v6.8 Fixes: 2d295fe65776d1 ("xfs: repair inode records") Signed-off-by: Darrick J. Wong Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- fs/xfs/scrub/inode_repair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/xfs/scrub/inode_repair.c +++ b/fs/xfs/scrub/inode_repair.c @@ -1724,7 +1724,7 @@ xrep_inode_blockcounts( */ ; } else if (XFS_IS_REALTIME_INODE(sc->ip)) { - if (count >= sc->mp->m_sb.sb_rblocks) + if (count >= sc->mp->m_sb.sb_rblocks + sc->mp->m_sb.sb_dblocks) return -EFSCORRUPTED; } else { if (count >= sc->mp->m_sb.sb_dblocks)