Lines Matching refs:ret

126 	int ret;  in ceph_auth_build_hello()  local
147 ret = ceph_auth_entity_name_encode(ac->name, &p, end); in ceph_auth_build_hello()
148 if (ret < 0) in ceph_auth_build_hello()
154 ret = p - buf; in ceph_auth_build_hello()
157 return ret; in ceph_auth_build_hello()
160 ret = -ERANGE; in ceph_auth_build_hello()
169 int ret; in build_request() local
181 ret = ac->ops->build_request(ac, p + sizeof(u32), end); in build_request()
182 if (ret < 0) { in build_request()
184 ceph_auth_proto_name(ac->protocol), ret); in build_request()
185 return ret; in build_request()
187 dout(" built request %d bytes\n", ret); in build_request()
188 ceph_encode_32(&p, ret); in build_request()
189 return p + ret - buf; in build_request()
211 int ret = -EINVAL; in ceph_handle_auth_reply() local
237 ret = result; in ceph_handle_auth_reply()
247 ret = init_protocol(ac, protocol); in ceph_handle_auth_reply()
248 if (ret) { in ceph_handle_auth_reply()
250 ceph_auth_proto_name(protocol), ret); in ceph_handle_auth_reply()
261 ret = result; in ceph_handle_auth_reply()
265 ret = ac->ops->handle_reply(ac, global_id, payload, payload_end, in ceph_handle_auth_reply()
267 if (ret == -EAGAIN) { in ceph_handle_auth_reply()
268 ret = build_request(ac, true, reply_buf, reply_len); in ceph_handle_auth_reply()
270 } else if (ret) { in ceph_handle_auth_reply()
276 return ret; in ceph_handle_auth_reply()
280 ret = -EINVAL; in ceph_handle_auth_reply()
287 int ret = 0; in ceph_build_auth() local
291 ret = build_request(ac, true, msg_buf, msg_len); in ceph_build_auth()
293 return ret; in ceph_build_auth()
298 int ret = 0; in ceph_auth_is_authenticated() local
302 ret = ac->ops->is_authenticated(ac); in ceph_auth_is_authenticated()
304 return ret; in ceph_auth_is_authenticated()
313 int ret; in __ceph_auth_get_authorizer() local
321 ret = ac->ops->create_authorizer(ac, peer_type, auth); in __ceph_auth_get_authorizer()
323 ret = ac->ops->update_authorizer(ac, peer_type, auth); in __ceph_auth_get_authorizer()
325 ret = 0; in __ceph_auth_get_authorizer()
326 if (ret) in __ceph_auth_get_authorizer()
337 return ret; in __ceph_auth_get_authorizer()
352 int ret = 0; in ceph_auth_add_authorizer_challenge() local
356 ret = ac->ops->add_authorizer_challenge(ac, a, challenge_buf, in ceph_auth_add_authorizer_challenge()
359 return ret; in ceph_auth_add_authorizer_challenge()
369 int ret = 0; in ceph_auth_verify_authorizer_reply() local
373 ret = ac->ops->verify_authorizer_reply(ac, a, in ceph_auth_verify_authorizer_reply()
377 return ret; in ceph_auth_verify_authorizer_reply()
433 int ret; in ceph_auth_get_request() local
437 ret = init_protocol(ac, proto); in ceph_auth_get_request()
438 if (ret) { in ceph_auth_get_request()
440 ceph_auth_proto_name(proto), ret); in ceph_auth_get_request()
450 ret = encode_con_modes(&p, end, ac->preferred_mode, ac->fallback_mode); in ceph_auth_get_request()
451 if (ret) in ceph_auth_get_request()
458 ret = ceph_auth_entity_name_encode(ac->name, &p, end); in ceph_auth_get_request()
459 if (ret) in ceph_auth_get_request()
464 ret = p - buf; in ceph_auth_get_request()
468 return ret; in ceph_auth_get_request()
471 ret = -ERANGE; in ceph_auth_get_request()
478 int ret; in ceph_auth_handle_reply_more() local
481 ret = ac->ops->handle_reply(ac, 0, reply, reply + reply_len, in ceph_auth_handle_reply_more()
483 if (ret == -EAGAIN) in ceph_auth_handle_reply_more()
484 ret = build_request(ac, false, buf, buf_len); in ceph_auth_handle_reply_more()
486 WARN_ON(ret >= 0); in ceph_auth_handle_reply_more()
488 return ret; in ceph_auth_handle_reply_more()
496 int ret; in ceph_auth_handle_reply_done() local
499 ret = ac->ops->handle_reply(ac, global_id, reply, reply + reply_len, in ceph_auth_handle_reply_done()
502 WARN_ON(ret == -EAGAIN || ret > 0); in ceph_auth_handle_reply_done()
504 return ret; in ceph_auth_handle_reply_done()
555 int ret; in ceph_auth_get_authorizer() local
557 ret = __ceph_auth_get_authorizer(ac, auth, peer_type, true, &proto, in ceph_auth_get_authorizer()
559 if (ret) in ceph_auth_get_authorizer()
560 return ret; in ceph_auth_get_authorizer()
564 ret = encode_con_modes(&p, end, pref_mode, fallb_mode); in ceph_auth_get_authorizer()
565 if (ret) in ceph_auth_get_authorizer()
566 return ret; in ceph_auth_get_authorizer()
584 int ret; in ceph_auth_handle_svc_reply_more() local
586 ret = ceph_auth_add_authorizer_challenge(ac, auth->authorizer, in ceph_auth_handle_svc_reply_more()
588 if (ret) in ceph_auth_handle_svc_reply_more()
589 return ret; in ceph_auth_handle_svc_reply_more()