ceph: make getxattr_cb return ssize_t
authorJeff Layton <jlayton@kernel.org>
Mon, 24 Jun 2019 11:39:18 +0000 (07:39 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 8 Jul 2019 12:01:44 +0000 (14:01 +0200)
commitf1d1b51deabbd1e7b8c24883145fbf784784d250
tree711ff8cc400436b0d2602aa244c9240d1134e8e5
parent49ada6e8dc9f64ad1e8dd6f7b453c9e584e9f897
ceph: make getxattr_cb return ssize_t

The getxattr_cb functions return size_t, which is unsigned and then
cast that value to int and then ssize_t before returning it. While all
of this works, it relies on implicit casting rules for signed/unsigned
conversions.

Change getxattr_cb to return ssize_t to better conform with what the
caller actually wants. Also, remove some suspicious casts.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Acked-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/xattr.c