summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-16 15:16:39 -0500
committerXavier Boudet <x-boudet@ti.com>2012-11-27 09:35:39 +0100
commit8eaeb522da742d40af2c3871b53dfb88d5d12557 (patch)
tree4be09b3a0b7f2ba236aa6c7c94abbe1ea3cc34bb /fs
parent081841bf4de01f313314d47f8c390ee81307dbe7 (diff)
ceph: messenger: reduce args to create_authorizer
(cherry picked from commit 74f1869f76d043bad12ec03b4d5f04a8c3d1f157) Make use of the new ceph_auth_handshake structure in order to reduce the number of arguments passed to the create_authorizor method in ceph_auth_client_ops. Use a local variable of that type as a shorthand in the get_authorizer method definitions. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/mds_client.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 42013c620488..b71ffd2c8094 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -3402,31 +3402,28 @@ static int get_authorizer(struct ceph_connection *con,
struct ceph_mds_session *s = con->private;
struct ceph_mds_client *mdsc = s->s_mdsc;
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
+ struct ceph_auth_handshake *auth = &s->s_auth;
int ret = 0;
- if (force_new && s->s_auth.authorizer) {
- ac->ops->destroy_authorizer(ac, s->s_auth.authorizer);
- s->s_auth.authorizer = NULL;
+ if (force_new && auth->authorizer) {
+ ac->ops->destroy_authorizer(ac, auth->authorizer);
+ auth->authorizer = NULL;
}
- if (s->s_auth.authorizer == NULL) {
+ if (auth->authorizer == NULL) {
if (ac->ops->create_authorizer) {
- ret = ac->ops->create_authorizer(
- ac, CEPH_ENTITY_TYPE_MDS,
- &s->s_auth.authorizer,
- &s->s_auth.authorizer_buf,
- &s->s_auth.authorizer_buf_len,
- &s->s_auth.authorizer_reply_buf,
- &s->s_auth.authorizer_reply_buf_len);
+ ret = ac->ops->create_authorizer(ac,
+ CEPH_ENTITY_TYPE_MDS, auth);
if (ret)
return ret;
}
}
*proto = ac->protocol;
- *buf = s->s_auth.authorizer_buf;
- *len = s->s_auth.authorizer_buf_len;
- *reply_buf = s->s_auth.authorizer_reply_buf;
- *reply_len = s->s_auth.authorizer_reply_buf_len;
+ *buf = auth->authorizer_buf;
+ *len = auth->authorizer_buf_len;
+ *reply_buf = auth->authorizer_reply_buf;
+ *reply_len = auth->authorizer_reply_buf_len;
+
return 0;
}