From: Sage Weil Date: Sun, 21 Mar 2010 03:43:28 +0000 (-0700) Subject: ceph: propagate mds session allocation failures to caller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c423956b8a495f0c048143abc5da955a70eac97;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: propagate mds session allocation failures to caller Return error to original caller if register_session() fails. Signed-off-by: Sage Weil --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 5cbf46abfee3..b6b5348055fc 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 &&