projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c315c5
)
ceph: handle kzalloc() failure
author
Cheng Renquan
<
[email protected]
>
Fri, 26 Mar 2010 10:04:40 +0000
(18:04 +0800)
committer
Sage Weil
<
[email protected]
>
Mon, 17 May 2010 22:25:16 +0000
(15:25 -0700)
Signed-off-by: Cheng Renquan <
[email protected]
>
Signed-off-by: Sage Weil <
[email protected]
>
fs/ceph/mds_client.c
patch
|
blob
|
history
diff --git
a/fs/ceph/mds_client.c
b/fs/ceph/mds_client.c
index ccb4141e306fec9ed015555c6e48ec1d1a9679ff..d549ab3adfda3bfe91af0558ed790c836789a445 100644
(file)
--- a/
fs/ceph/mds_client.c
+++ b/
fs/ceph/mds_client.c
@@
-2631,6
+2631,9
@@
int ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client)
mdsc->client = client;
mutex_init(&mdsc->mutex);
mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
+ if (mdsc->mdsmap == NULL)
+ return -ENOMEM;
+
init_completion(&mdsc->safe_umount_waiters);
init_completion(&mdsc->session_close_waiters);
INIT_LIST_HEAD(&mdsc->waiting_for_map);
@@
-2656,6
+2659,7
@@
int ceph_mdsc_init(struct ceph_mds_client *mdsc, struct ceph_client *client)
init_waitqueue_head(&mdsc->cap_flushing_wq);
spin_lock_init(&mdsc->dentry_lru_lock);
INIT_LIST_HEAD(&mdsc->dentry_lru);
+
return 0;
}