projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a64054
)
ceph: Free mdsc if alloc mdsc->mdsmap failed.
author
majianpeng
<majianpeng@gmail.com>
Tue, 25 Jun 2013 06:48:19 +0000
(14:48 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:25 +0000
(12:24 -0800)
commit
fb3101b6f0db9ae3f35dc8e6ec908d0af8cdf12e
upstream.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/mds_client.c
patch
|
blob
|
history
diff --git
a/fs/ceph/mds_client.c
b/fs/ceph/mds_client.c
index 1ce14c18c468b051a1e4710ff1461c64e2256e1f..63c789eb1e3eb818284a494a07cd577d1e8da50b 100644
(file)
--- a/
fs/ceph/mds_client.c
+++ b/
fs/ceph/mds_client.c
@@
-3044,8
+3044,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);