* [PATCH][TRIVIAL] ceph: Free mdsc if alloc mdsc->mdsmap failed.
@ 2013-06-25 6:48 majianpeng
2013-06-25 15:24 ` Sage Weil
0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2013-06-25 6:48 UTC (permalink / raw)
To: sage; +Cc: ceph-devel
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
fs/ceph/mds_client.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 4d29203..9fb58f6 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -3040,8 +3040,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);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][TRIVIAL] ceph: Free mdsc if alloc mdsc->mdsmap failed.
2013-06-25 6:48 [PATCH][TRIVIAL] ceph: Free mdsc if alloc mdsc->mdsmap failed majianpeng
@ 2013-06-25 15:24 ` Sage Weil
0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2013-06-25 15:24 UTC (permalink / raw)
To: majianpeng; +Cc: ceph-devel
Applied, thanks!
sage
On Tue, 25 Jun 2013, majianpeng wrote:
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> fs/ceph/mds_client.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 4d29203..9fb58f6 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -3040,8 +3040,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);
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-25 15:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 6:48 [PATCH][TRIVIAL] ceph: Free mdsc if alloc mdsc->mdsmap failed majianpeng
2013-06-25 15:24 ` Sage Weil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.