Re: [PATCH 09/12] md-cluster: add missed lockres_free
From: Goldwyn Rodrigues <hidden>
Date: 2015-07-27 16:30:26
From: Goldwyn Rodrigues <hidden>
Date: 2015-07-27 16:30:26
On 07/10/2015 04:01 AM, Guoqing Jiang wrote:
We also need to free the lock resource before goto out. Signed-off-by: Guoqing Jiang <redacted>
Reviewed-by: Goldwyn Rodrigues <redacted>
--- drivers/md/md-cluster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 057a973..411b430 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);
-- Goldwyn