mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
xfs: free xfs_busy_extents structure when no RT extents are queued
kmemleak occasionally reports leaking xfs_busy_extents structure
from xfs_scrub calls after running xfs/528 (but attributed to following
tests), which seems to be caused by not freeing the xfs_busy_extents
structure when tr.queued is 0 and xfs_trim_rtgroup_extents breaks out
of the main loop. Free the structure in this case.
Fixes: a3315d11305f ("xfs: use rtgroup busy extent list for FITRIM")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
21ab5179aa
commit
d8a823c6f0
@ -726,8 +726,10 @@ xfs_trim_rtgroup_extents(
|
||||
break;
|
||||
}
|
||||
|
||||
if (!tr.queued)
|
||||
if (!tr.queued) {
|
||||
kfree(tr.extents);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* We hand the extent list to the discard function here so the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user