Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb3101b6 authored by majianpeng's avatar majianpeng Committed by Sage Weil
Browse files

ceph: Free mdsc if alloc mdsc->mdsmap failed.

parent 0405a149
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3042,8 +3042,10 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
	fsc->mdsc = mdsc;
	mutex_init(&mdsc->mutex);
	mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
	if (mdsc->mdsmap == NULL)
	if (mdsc->mdsmap == NULL) {
		kfree(mdsc);
		return -ENOMEM;
	}

	init_completion(&mdsc->safe_umount_waiters);
	init_waitqueue_head(&mdsc->session_close_wq);