aboutsummaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-20 20:43:28 -0700
committerSage Weil <sage@newdream.net>2010-03-23 07:47:04 -0700
commit9c423956b8a495f0c048143abc5da955a70eac97 (patch)
tree4577ebc496d6e2aea708cced214789113fbd75ba /fs/ceph
parent8f883c24de33ba929c95e018ac0ba66e4f46734b (diff)
ceph: propagate mds session allocation failures to caller
Return error to original caller if register_session() fails. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 5cbf46abfee..b6b5348055f 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1567,8 +1567,13 @@ static int __do_request(struct ceph_mds_client *mdsc,
/* get, open session */
session = __ceph_lookup_mds_session(mdsc, mds);
- if (!session)
+ if (!session) {
session = register_session(mdsc, mds);
+ if (IS_ERR(session)) {
+ err = PTR_ERR(session);
+ goto finish;
+ }
+ }
dout("do_request mds%d session %p state %s\n", mds, session,
session_state_name(session->s_state));
if (session->s_state != CEPH_MDS_SESSION_OPEN &&