Skip to content

Commit 0dde584

Browse files
committed
libceph: drop len argument of *verify_authorizer_reply()
The length of the reply is protocol-dependent - for cephx it's ceph_x_authorize_reply. Nothing sensible can be passed from the messenger layer anyway. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Sage Weil <sage@redhat.com>
1 parent 5c056fd commit 0dde584

7 files changed

Lines changed: 11 additions & 12 deletions

File tree

‎fs/ceph/mds_client.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3943,13 +3943,13 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con,
39433943
}
39443944

39453945

3946-
static int verify_authorizer_reply(struct ceph_connection *con, int len)
3946+
static int verify_authorizer_reply(struct ceph_connection *con)
39473947
{
39483948
struct ceph_mds_session *s = con->private;
39493949
struct ceph_mds_client *mdsc = s->s_mdsc;
39503950
struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth;
39513951

3952-
return ceph_auth_verify_authorizer_reply(ac, s->s_auth.authorizer, len);
3952+
return ceph_auth_verify_authorizer_reply(ac, s->s_auth.authorizer);
39533953
}
39543954

39553955
static int invalidate_authorizer(struct ceph_connection *con)

‎include/linux/ceph/auth.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct ceph_auth_client_ops {
6464
int (*update_authorizer)(struct ceph_auth_client *ac, int peer_type,
6565
struct ceph_auth_handshake *auth);
6666
int (*verify_authorizer_reply)(struct ceph_auth_client *ac,
67-
struct ceph_authorizer *a, size_t len);
67+
struct ceph_authorizer *a);
6868
void (*invalidate_authorizer)(struct ceph_auth_client *ac,
6969
int peer_type);
7070

@@ -118,8 +118,7 @@ extern int ceph_auth_update_authorizer(struct ceph_auth_client *ac,
118118
int peer_type,
119119
struct ceph_auth_handshake *a);
120120
extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac,
121-
struct ceph_authorizer *a,
122-
size_t len);
121+
struct ceph_authorizer *a);
123122
extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac,
124123
int peer_type);
125124

‎include/linux/ceph/messenger.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct ceph_connection_operations {
3030
struct ceph_auth_handshake *(*get_authorizer) (
3131
struct ceph_connection *con,
3232
int *proto, int force_new);
33-
int (*verify_authorizer_reply) (struct ceph_connection *con, int len);
33+
int (*verify_authorizer_reply) (struct ceph_connection *con);
3434
int (*invalidate_authorizer)(struct ceph_connection *con);
3535

3636
/* there was some error on the socket (disconnect, whatever) */

‎net/ceph/auth.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,13 @@ int ceph_auth_update_authorizer(struct ceph_auth_client *ac,
315315
EXPORT_SYMBOL(ceph_auth_update_authorizer);
316316

317317
int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac,
318-
struct ceph_authorizer *a, size_t len)
318+
struct ceph_authorizer *a)
319319
{
320320
int ret = 0;
321321

322322
mutex_lock(&ac->mutex);
323323
if (ac->ops && ac->ops->verify_authorizer_reply)
324-
ret = ac->ops->verify_authorizer_reply(ac, a, len);
324+
ret = ac->ops->verify_authorizer_reply(ac, a);
325325
mutex_unlock(&ac->mutex);
326326
return ret;
327327
}

‎net/ceph/auth_x.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ static int ceph_x_update_authorizer(
623623
}
624624

625625
static int ceph_x_verify_authorizer_reply(struct ceph_auth_client *ac,
626-
struct ceph_authorizer *a, size_t len)
626+
struct ceph_authorizer *a)
627627
{
628628
struct ceph_x_authorizer *au = (void *)a;
629629
void *p = au->enc_buf;

‎net/ceph/messenger.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ static int process_connect(struct ceph_connection *con)
20332033
* should also define ->verify_authorizer_reply().
20342034
* See get_connect_authorizer().
20352035
*/
2036-
ret = con->ops->verify_authorizer_reply(con, 0);
2036+
ret = con->ops->verify_authorizer_reply(con);
20372037
if (ret < 0) {
20382038
con->error_msg = "bad authorize reply";
20392039
return ret;

‎net/ceph/osd_client.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4478,13 +4478,13 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con,
44784478
}
44794479

44804480

4481-
static int verify_authorizer_reply(struct ceph_connection *con, int len)
4481+
static int verify_authorizer_reply(struct ceph_connection *con)
44824482
{
44834483
struct ceph_osd *o = con->private;
44844484
struct ceph_osd_client *osdc = o->o_osdc;
44854485
struct ceph_auth_client *ac = osdc->client->monc.auth;
44864486

4487-
return ceph_auth_verify_authorizer_reply(ac, o->o_auth.authorizer, len);
4487+
return ceph_auth_verify_authorizer_reply(ac, o->o_auth.authorizer);
44884488
}
44894489

44904490
static int invalidate_authorizer(struct ceph_connection *con)

0 commit comments

Comments
 (0)