1
0
Fork 0

ceph: return proper bool type to caller instead of pointer

Change to return true/false only for bool type return code.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
hifive-unleashed-5.1
Chengguang Xu 2018-03-13 10:43:45 +08:00 committed by Ilya Dryomov
parent bb48bd4dc4
commit 98cfda8104
1 changed files with 3 additions and 2 deletions

View File

@ -419,9 +419,10 @@ struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc,
static bool __have_session(struct ceph_mds_client *mdsc, int mds)
{
if (mds >= mdsc->max_sessions)
if (mds >= mdsc->max_sessions || !mdsc->sessions[mds])
return false;
return mdsc->sessions[mds];
else
return true;
}
static int __verify_registered_session(struct ceph_mds_client *mdsc,