ceph: simplify arguments and return semantics of try_get_cap_refs
authorJeff Layton <jlayton@kernel.org>
Tue, 2 Apr 2019 19:58:05 +0000 (15:58 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 7 May 2019 17:22:38 +0000 (19:22 +0200)
commit1199d7da2d29dac5e3983ea1078dbd4ab107e33f
tree38dae5f4e59d7dd8340ad76e185fad11d996bccd
parenta452bc0636728b8c12632ae4b5f4ddf39cbe39c1
ceph: simplify arguments and return semantics of try_get_cap_refs

The return of this function is rather complex. It can return 0 or 1,
and in the case of a 1 return, the "err" pointer will be filled out.
This necessitates a lot of copying of values.

We can achieve the same effect by just returning 0, 1 or a negative
error code, and drop the "err" argument from this function.

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