Skip to content

Commit

Permalink
ceph: return proper bool type to caller instead of pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chengguang Xu authored and Ilya Dryomov committed Apr 2, 2018
1 parent bb48bd4 commit 98cfda8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 98cfda8

Please sign in to comment.