Re: [PATCH v2] xfs: fix off-by-one in rtrefcount btree root level validation

Carlos Maiolino <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <178463069007.324722.5307902735949232521.b4-ty@b4>
On Tue, 14 Jul 2026 14:56:12 -0700, Xiang Mei wrote:
> xfs_rtrefcountbt_compute_maxlevels() sets
> 
> 	mp->m_rtrefc_maxlevels = min(d_maxlevels, r_maxlevels) + 1;
> 
> where the trailing "+ 1" already accounts for the inode-root level, so the
> deepest valid on-disk root level is m_rtrefc_maxlevels - 1 and a cursor must
> satisfy bc_nlevels <= bc_maxlevels (= m_rtrefc_maxlevels).
> 
> [...]

Applied to for-next, thanks!

[1/1] xfs: fix off-by-one in rtrefcount btree root level validation
      commit: fde50b32183f19041b4bab66c8f07b1cc38f8e26

Best regards,
-- 
Carlos Maiolino <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.