提交 d4a780ce 编写于 作者: S Sage Weil

ceph: fix leak of monc mutex

Fix leak of monc mutex on ENOMEM or bad fsid when receiving new mon map.
Audited all other users.
Signed-off-by: NSage Weil <sage@newdream.net>
上级 767ea5c3
......@@ -320,17 +320,18 @@ static void ceph_monc_handle_map(struct ceph_mon_client *monc,
if (IS_ERR(monmap)) {
pr_err("problem decoding monmap, %d\n",
(int)PTR_ERR(monmap));
return;
goto out;
}
if (ceph_check_fsid(monc->client, &monmap->fsid) < 0) {
kfree(monmap);
return;
goto out;
}
client->monc.monmap = monmap;
kfree(old);
out:
mutex_unlock(&monc->mutex);
wake_up(&client->mount_wq);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册