linux/fs/xfs/scrub
Yingjie Gao c3e0738943 xfs: fix rtgroup cleanup in CoW fork repair
xrep_cow_find_bad_rt() initializes scrub rtgroup state before the
force-rebuild path calls xrep_cow_mark_file_range(). If that call
fails, the code jumps directly to out_rtg, which skips the scrub
rtgroup cleanup and only drops the local rtgroup reference.

Remove the unnecessary jump so the function falls through to out_sr,
ensuring the realtime cursors, lock state, and sr->rtg reference are
released before returning.

Fixes: fd97fe1112 ("xfs: fix CoW forks for realtime files")
Cc: <stable@vger.kernel.org> # v6.14
Signed-off-by: Yingjie Gao <gaoyingjie@uniontech.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
History 2026-05-30 08:26:18 +02:00
..
agb_bitmap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
agb_bitmap.h xfs: create agblock bitmap helper to count the number of set regions 2024-02-22 12:43:37 -08:00
agheader.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
agheader_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
agino_bitmap.h xfs: repair AGI unlinked inode bucket lists 2024-04-15 14:58:58 -07:00
alloc.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
alloc_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
attr.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
attr.h xfs: repair extended attributes 2024-04-15 14:58:53 -07:00
attr_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
attr_repair.h xfs: actually rebuild the parent pointer xattrs 2024-04-23 16:55:15 -07:00
bitmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
bitmap.h xfs: create agblock bitmap helper to count the number of set regions 2024-02-22 12:43:37 -08:00
bmap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
bmap_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
btree.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
btree.h overflow: Add struct_size_t() helper 2023-05-26 13:52:19 -07:00
common.c xfs: check directory data block header padding in scrub 2026-04-27 10:36:36 +02:00
common.h xfs: check directory data block header padding in scrub 2026-04-27 10:36:36 +02:00
cow_repair.c xfs: fix rtgroup cleanup in CoW fork repair 2026-05-30 08:26:18 +02:00
dab_bitmap.h xfs: create an xattr iteration function for scrub 2024-04-15 14:58:54 -07:00
dabtree.c xfs: check da node block pad field during scrub 2026-04-27 10:36:36 +02:00
dabtree.h xfs: flag empty xattr leaf blocks for optimization 2024-04-15 14:58:54 -07:00
dir.c xfs: check directory data block header padding in scrub 2026-04-27 10:36:36 +02:00
dir_repair.c xfs: fix copy-paste error in previous fix 2026-02-25 13:58:48 +01:00
dirtree.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
dirtree.h xfs: refactor directory tree root predicates 2024-11-05 13:38:33 -08:00
dirtree_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
dqiterate.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
findparent.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
findparent.h xfs: implement live updates for directory repairs 2024-04-23 16:55:13 -07:00
fsb_bitmap.h xfs: reintroduce reaping of file metadata blocks to xrep_reap_extents 2023-12-15 10:03:38 -08:00
fscounters.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
fscounters.h xfs: support RT inodes in xfs_mod_delalloc 2024-04-22 18:00:48 +05:30
fscounters_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
health.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
health.h xfs: refactor the btree cursor allocation logic in xchk_ag_btcur_init 2024-02-22 12:39:48 -08:00
ialloc.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
ialloc_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ino_bitmap.h xfs: teach online scrub to find directory tree structure problems 2024-04-23 16:55:16 -07:00
inode.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
inode_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
iscan.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
iscan.h xfs: scan the filesystem to repair a directory dotdot entry 2024-04-15 14:58:56 -07:00
listxattr.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
listxattr.h xfs: add a per-leaf block callback to xchk_xattr_walk 2024-04-23 16:55:15 -07:00
metapath.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
newbt.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
newbt.h xfs: support repairing metadata btrees rooted in metadir inodes 2024-12-23 13:06:08 -08:00
nlinks.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
nlinks.h xfs: move files to orphanage instead of letting nlinks drop to zero 2024-04-15 14:58:57 -07:00
nlinks_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
off_bitmap.h xfs: repair problems in CoW forks 2023-12-15 10:03:40 -08:00
orphanage.c xfs: Fix error pointer dereference 2026-02-25 13:58:48 +01:00
orphanage.h xfs: fix corruptions in the directory tree 2024-04-23 16:55:17 -07:00
parent.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
parent_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
quota.c xfs: scrub: unlock dquot before early return in quota scrub 2026-03-18 09:44:46 +01:00
quota.h xfs: repair quotas 2023-12-15 10:03:45 -08:00
quota_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
quotacheck.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
quotacheck.h xfs: repair dquots based on live quotacheck results 2024-02-22 12:30:57 -08:00
quotacheck_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
rcbag.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rcbag.h xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
rcbag_btree.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
rcbag_btree.h xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
readdir.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
readdir.h xfs: deferred scrub of dirents 2024-04-23 07:47:02 -07:00
reap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
reap.h xfs: fix CoW forks for realtime files 2024-12-23 13:06:17 -08:00
refcount.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
refcount_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
repair.c xfs: check return value of xchk_scrub_create_subord 2026-01-24 08:46:38 -08:00
repair.h xfs: remove static reap limits from repair.h 2025-09-05 08:48:23 -07:00
rgb_bitmap.h xfs: capture realtime CoW staging extents when rebuilding rt rmapbt 2024-12-23 13:06:16 -08:00
rgsuper.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
rmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rmap_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtb_bitmap.h xfs: fix CoW forks for realtime files 2024-12-23 13:06:17 -08:00
rtbitmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtbitmap.h xfs: online repair of realtime bitmaps for a realtime group 2024-12-23 13:06:08 -08:00
rtbitmap_repair.c xfs: get rid of the xchk_xfile_*_descr calls 2026-01-23 09:27:37 -08:00
rtrefcount.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtrefcount_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtrmap.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
rtrmap_repair.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtsummary.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
rtsummary.h xfs: replace m_rsumsize with m_rsumblocks 2024-09-01 08:58:19 -07:00
rtsummary_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
scrub.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
scrub.h xfs: constify feature checks 2025-01-13 14:57:08 +01:00
stats.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
stats.h xfs: track usage statistics of online fsck 2023-08-10 07:48:07 -07:00
symlink.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
symlink_repair.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
tempexch.h xfs: online repair of realtime bitmaps for a realtime group 2024-12-23 13:06:08 -08:00
tempfile.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
tempfile.h xfs: move repair temporary files to the metadata directory tree 2024-11-05 13:38:34 -08:00
trace.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
trace.h xfs: remove file_path tracepoint data 2026-03-26 14:25:23 +01:00
xfarray.c xfs: directly include xfs_platform.h 2026-01-21 12:57:16 +01:00
xfarray.h xfs: reduce the rate of cond_resched calls inside scrub 2024-04-23 16:55:17 -07:00
xfblob.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
xfblob.h xfs: online repair of directories 2024-04-15 14:58:55 -07:00
xfile.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
xfile.h xfs: repair extended attributes 2024-04-15 14:58:53 -07:00
xfs_scrub.h xfs: introduce vectored scrub mode 2024-04-23 16:55:18 -07:00