xfs: free up mp->m_free[0].count in error case
PATCH 1/1 xfs: free up mp->m_free[0].count in error case
In xfs_init_percpu_counters(), memory for mp->m_free[0].count wasn't freed in error case. Free it up in this patch.
Signed-off-by Wengang Wang <[email protected]>
--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
@@ -1149,7 +1149,7 @@ xfs_init_percpu_counters(return 0 ; free_freecounters: -while (--i >0 ) +while (--i >=0 )percpu_counter_destroy (&mp->m_free[i].count);percpu_counter_destroy (&mp->m_delalloc_rtextents); free_delalloc:
Signature · 1 line
2.39.5 (Apple Git-154)
Quoted 2 lines · Wengang Wang
In
xfs_init_percpu_counters(), memory for mp->m_free[0].count wasn't freed in error case. Free it up in this patch.
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 4 lines · Wengang Wang
In
xfs_init_percpu_counters(), memory for mp->m_free[0].count wasn't freed in error case. Free it up in this patch.Signed-off-by Wengang Wang <[email protected]>
Yeah, that looks like a leak.
Fixes 712bae96631852 ("xfs: generalize the freespace and reserved blocks handling")
Reviewed-by "Darrick J. Wong" <[email protected]>
--D
Quoted 21 lines
--- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/xfs_super.c +1
-1@@ -1149,7 +1149,7 @@ xfs_init_percpu_counters(return 0 ; free_freecounters: -while (--i >0 ) +while (--i >=0 )percpu_counter_destroy (&mp->m_free[i].count);percpu_counter_destroy (&mp->m_delalloc_rtextents); free_delalloc:Signature · 1 line
2.39.5 (Apple Git-154)
Quoted 4 lines · Wengang Wang
In
xfs_init_percpu_counters(), memory for mp->m_free[0].count wasn't freed in error case. Free it up in this patch.
Applied to for-next, thanks!
[1/1] xfs: free up mp->m_free[0].count in error case
commit: 3af35b41400cce7317b642c45b762b41967dfdf3
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>