|
@@ -334,10 +334,10 @@ void ceph_put_mds_session(struct ceph_mds_session *s)
|
|
dout("mdsc put_session %p %d -> %d\n", s,
|
|
dout("mdsc put_session %p %d -> %d\n", s,
|
|
atomic_read(&s->s_ref), atomic_read(&s->s_ref)-1);
|
|
atomic_read(&s->s_ref), atomic_read(&s->s_ref)-1);
|
|
if (atomic_dec_and_test(&s->s_ref)) {
|
|
if (atomic_dec_and_test(&s->s_ref)) {
|
|
- if (s->s_authorizer)
|
|
|
|
|
|
+ if (s->s_auth.authorizer)
|
|
s->s_mdsc->fsc->client->monc.auth->ops->destroy_authorizer(
|
|
s->s_mdsc->fsc->client->monc.auth->ops->destroy_authorizer(
|
|
s->s_mdsc->fsc->client->monc.auth,
|
|
s->s_mdsc->fsc->client->monc.auth,
|
|
- s->s_authorizer);
|
|
|
|
|
|
+ s->s_auth.authorizer);
|
|
kfree(s);
|
|
kfree(s);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3404,29 +3404,29 @@ static int get_authorizer(struct ceph_connection *con,
|
|
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
|
|
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
- if (force_new && s->s_authorizer) {
|
|
|
|
- ac->ops->destroy_authorizer(ac, s->s_authorizer);
|
|
|
|
- s->s_authorizer = NULL;
|
|
|
|
|
|
+ if (force_new && s->s_auth.authorizer) {
|
|
|
|
+ ac->ops->destroy_authorizer(ac, s->s_auth.authorizer);
|
|
|
|
+ s->s_auth.authorizer = NULL;
|
|
}
|
|
}
|
|
- if (s->s_authorizer == NULL) {
|
|
|
|
|
|
+ if (s->s_auth.authorizer == NULL) {
|
|
if (ac->ops->create_authorizer) {
|
|
if (ac->ops->create_authorizer) {
|
|
ret = ac->ops->create_authorizer(
|
|
ret = ac->ops->create_authorizer(
|
|
ac, CEPH_ENTITY_TYPE_MDS,
|
|
ac, CEPH_ENTITY_TYPE_MDS,
|
|
- &s->s_authorizer,
|
|
|
|
- &s->s_authorizer_buf,
|
|
|
|
- &s->s_authorizer_buf_len,
|
|
|
|
- &s->s_authorizer_reply_buf,
|
|
|
|
- &s->s_authorizer_reply_buf_len);
|
|
|
|
|
|
+ &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);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
*proto = ac->protocol;
|
|
*proto = ac->protocol;
|
|
- *buf = s->s_authorizer_buf;
|
|
|
|
- *len = s->s_authorizer_buf_len;
|
|
|
|
- *reply_buf = s->s_authorizer_reply_buf;
|
|
|
|
- *reply_len = s->s_authorizer_reply_buf_len;
|
|
|
|
|
|
+ *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;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -3437,7 +3437,7 @@ static int verify_authorizer_reply(struct ceph_connection *con, int len)
|
|
struct ceph_mds_client *mdsc = s->s_mdsc;
|
|
struct ceph_mds_client *mdsc = s->s_mdsc;
|
|
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
|
|
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
|
|
|
|
|
|
- return ac->ops->verify_authorizer_reply(ac, s->s_authorizer, len);
|
|
|
|
|
|
+ return ac->ops->verify_authorizer_reply(ac, s->s_auth.authorizer, len);
|
|
}
|
|
}
|
|
|
|
|
|
static int invalidate_authorizer(struct ceph_connection *con)
|
|
static int invalidate_authorizer(struct ceph_connection *con)
|