Commit 9bcd15bd authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Greg Kroah-Hartman

md-cluster: free md_cluster_info if node leave cluster


[ Upstream commit 9c8043f3 ]

To avoid memory leak, we need to free the cinfo which
is allocated when node join cluster.
Reviewed-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9841d7b0
...@@ -974,6 +974,7 @@ static int leave(struct mddev *mddev) ...@@ -974,6 +974,7 @@ static int leave(struct mddev *mddev)
lockres_free(cinfo->bitmap_lockres); lockres_free(cinfo->bitmap_lockres);
unlock_all_bitmaps(mddev); unlock_all_bitmaps(mddev);
dlm_release_lockspace(cinfo->lockspace, 2); dlm_release_lockspace(cinfo->lockspace, 2);
kfree(cinfo);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment