diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-07-10 17:01:20 +0800 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-08-31 19:42:23 +0200 |
commit | 6e6d9f2cda47745a3abcb6609b1dee0e831161d8 (patch) | |
tree | d67a23be0f9c90c3602c643b2cb8815b9a0ce1f5 /drivers/md/md-cluster.c | |
parent | b2b9bfff0aa721a04a3924ed451c417d2bd9ed15 (diff) | |
download | talos-obmc-linux-6e6d9f2cda47745a3abcb6609b1dee0e831161d8.tar.gz talos-obmc-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.c | 4 |
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); |