From: Guoqing Jiang Date: Fri, 10 Jul 2015 09:01:20 +0000 (+0800) Subject: md-cluster: add missed lockres_free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e6d9f2cda47745a3abcb6609b1dee0e831161d8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git md-cluster: add missed lockres_free We also need to free the lock resource before goto out. Reviewed-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown --- diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 057a9733f748..411b4306840f 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -647,8 +647,10 @@ static int gather_all_resync_info(struct mddev *mddev, int total_slots) lockres_free(bm_lockres); continue; } - if (ret) + if (ret) { + lockres_free(bm_lockres); goto out; + } /* TODO: Read the disk bitmap sb and check if it needs recovery */ dlm_unlock_sync(bm_lockres); lockres_free(bm_lockres);