projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c42395
)
ceph: handle kmalloc() failure
author
Dan Carpenter
<error27@gmail.com>
Sat, 20 Mar 2010 12:30:16 +0000
(15:30 +0300)
committer
Sage Weil
<sage@newdream.net>
Tue, 23 Mar 2010 14:47:04 +0000
(07:47 -0700)
Return ERR_PTR(-ENOMEM) if kmalloc() fails. We handle allocation
failures the same way later in the function.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/mds_client.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ceph/mds_client.c
b/fs/ceph/mds_client.c
index b6b5348055fc395a394bf0b832289d62c63dc02f..ad0fbc3128d3b48c985d8fdd6f0070495c83fe60 100644
(file)
--- a/
fs/ceph/mds_client.c
+++ b/
fs/ceph/mds_client.c
@@
-328,6
+328,8
@@
static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc,
struct ceph_mds_session *s;
s = kzalloc(sizeof(*s), GFP_NOFS);
+ if (!s)
+ return ERR_PTR(-ENOMEM);
s->s_mdsc = mdsc;
s->s_mds = mds;
s->s_state = CEPH_MDS_SESSION_NEW;