diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2020-11-19 21:13:58 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-12-15 01:21:50 +0300 |
commit | ce287162d9738fe03a3731904710b6700ba686aa (patch) | |
tree | b8bf6d8d2448d6ad4799f14ae25878997fd229eb /net/ceph/osd_client.c | |
parent | cd1a677cad994021b19665ed476aea63f5d54f31 (diff) | |
download | linux-ce287162d9738fe03a3731904710b6700ba686aa.tar.xz |
libceph, ceph: make use of __ceph_auth_get_authorizer() in msgr1
This shouldn't cause any functional changes.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r-- | net/ceph/osd_client.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 662b52e52651..61229c5e22cb 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -5589,23 +5589,12 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con, struct ceph_osd_client *osdc = o->o_osdc; struct ceph_auth_client *ac = osdc->client->monc.auth; struct ceph_auth_handshake *auth = &o->o_auth; + int ret; - if (force_new && auth->authorizer) { - ceph_auth_destroy_authorizer(auth->authorizer); - auth->authorizer = NULL; - } - if (!auth->authorizer) { - int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_OSD, - auth); - if (ret) - return ERR_PTR(ret); - } else { - int ret = ceph_auth_update_authorizer(ac, CEPH_ENTITY_TYPE_OSD, - auth); - if (ret) - return ERR_PTR(ret); - } - *proto = ac->protocol; + ret = __ceph_auth_get_authorizer(ac, auth, CEPH_ENTITY_TYPE_OSD, + force_new, proto, NULL, NULL); + if (ret) + return ERR_PTR(ret); return auth; } |