Re: [PATCH] ceph: return proper bool type to caller instead of pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 13, 2018 at 10:43 AM, Chengguang Xu <cgxu519@xxxxxxx> wrote:
> Change to return true/false only for bool type return code.
>
> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
> ---
>  fs/ceph/mds_client.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index e932c06..70d696b 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -439,9 +439,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,
> --
> 1.8.3.1
>

Applied, thanks
Yan, Zheng

> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux