diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-03-13 10:43:45 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-04-02 10:12:49 +0200 |
commit | 98cfda81040f4a6925a98567d036a918e855d4ec (patch) | |
tree | 59c604165207dd810f8d9485f50a567b08a0c35f /fs | |
parent | bb48bd4dc45f9ee1e44d8e9fcb01023e0d0ba80d (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/mds_client.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a511a777ffb9..3a555b604441 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -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, |