File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -76,19 +76,21 @@ void free_shrinker_info(struct mem_cgroup *memcg)
7676
7777int alloc_shrinker_info (struct mem_cgroup * memcg )
7878{
79- struct shrinker_info * info ;
8079 int nid , ret = 0 ;
8180 int array_size = 0 ;
8281
8382 mutex_lock (& shrinker_mutex );
8483 array_size = shrinker_unit_size (shrinker_nr_max );
8584 for_each_node (nid ) {
86- info = kvzalloc_node (sizeof (* info ) + array_size , GFP_KERNEL , nid );
85+ struct shrinker_info * info = kvzalloc_node (sizeof (* info ) + array_size ,
86+ GFP_KERNEL , nid );
8787 if (!info )
8888 goto err ;
8989 info -> map_nr_max = shrinker_nr_max ;
90- if (shrinker_unit_alloc (info , NULL , nid ))
90+ if (shrinker_unit_alloc (info , NULL , nid )) {
91+ kvfree (info );
9192 goto err ;
93+ }
9294 rcu_assign_pointer (memcg -> nodeinfo [nid ]-> shrinker_info , info );
9395 }
9496 mutex_unlock (& shrinker_mutex );
You can’t perform that action at this time.
0 commit comments