Skip to content

Commit

Permalink
ceph: propagate mds session allocation failures to caller
Browse files Browse the repository at this point in the history
Return error to original caller if register_session() fails.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Mar 23, 2010
1 parent 8f883c2 commit 9c42395
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 9c42395

Please sign in to comment.