summaryrefslogtreecommitdiffstats
path: root/drivers/md/md-cluster.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2015-07-10 11:01:20 +0200
committerNeilBrown <neilb@suse.com>2015-08-31 19:42:23 +0200
commit6e6d9f2cda47745a3abcb6609b1dee0e831161d8 (patch)
treed67a23be0f9c90c3602c643b2cb8815b9a0ce1f5 /drivers/md/md-cluster.c
parentmd-cluster: remove the unused sb_lock (diff)
downloadlinux-6e6d9f2cda47745a3abcb6609b1dee0e831161d8.tar.xz
linux-6e6d9f2cda47745a3abcb6609b1dee0e831161d8.zip
md-cluster: add missed lockres_free
We also need to free the lock resource before goto out. Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/md-cluster.c')
-rw-r--r--drivers/md/md-cluster.c4
1 files changed, 3 insertions, 1 deletions
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);