ocfs2-validate-i_refcount_loc-when-refcount-flag-is-set.patch removed from -mm tree
The quilt patch titled
Subject: ocfs2: validate i_refcount_loc when refcount flag is set
has been removed from the -mm tree. Its filename was
ocfs2-validate-i_refcount_loc-when-refcount-flag-is-set.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Deepanshu Kartikey <[email protected]>
Subject: ocfs2: validate i_refcount_loc when refcount flag is set
Date: Fri, 12 Dec 2025 11:28:26 +0530
Add validation in ocfs2_validate_inode_block() to check that if an inode has OCFS2_HAS_REFCOUNT_FL set, it must also have a valid i_refcount_loc. A corrupted filesystem image can have this inconsistent state, which later triggers a BUG_ON in ocfs2_remove_refcount_tree() when the inode is being wiped during unlink.
Catch this corruption early during inode validation to fail gracefully instead of crashing the kernel.
---
fs/ocfs2/inode.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ocfs2/inode.c renamed from fs/ocfs2/inode.c~ocfs2-validate-i_refcount_loc-when-refcount-flag-is-set +7 -0
@@ -1529,6 +1529,13 @@ int ocfs2_validate_inode_block(struct su } } +if ((le16_to_cpu (di->i_dyn_features) &OCFS2_HAS_REFCOUNT_FL ) && + !di->i_refcount_loc) { + rc =ocfs2_error (sb,"Inode #%llu has refcount flag but no i_refcount_loc\n" , + (unsigned long long )bh->b_blocknr); + goto bail; + } + rc =0 ; bail:
_
Patches currently in -mm which might be from [email protected] are
mm-swap_cgroup-fix-kernel-bug-in-swap_cgroup_record.patch mm-vmalloc-prevent-rcu-stalls-in-kasan_release_vmalloc_node.patch