Skip to content

Commit 09dab6c

Browse files
Wengang-oraclecmaiolino
authored andcommitted
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 <wen.gang.wang@oracle.com> Fixes: 712bae9 ("xfs: generalize the freespace and reserved blocks handling") Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
1 parent f0447f8 commit 09dab6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ xfs_init_percpu_counters(
11491149
return 0;
11501150

11511151
free_freecounters:
1152-
while (--i > 0)
1152+
while (--i >= 0)
11531153
percpu_counter_destroy(&mp->m_free[i].count);
11541154
percpu_counter_destroy(&mp->m_delalloc_rtextents);
11551155
free_delalloc:

0 commit comments

Comments
 (0)