mds_client.c (1cbc99dfe5d7d686fd022647f4e489b5eb8e9068) | mds_client.c (6c1ea260f89709e0021d2c59f8fd2a104b5b1123) |
---|---|
1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/fs.h> 4#include <linux/wait.h> 5#include <linux/slab.h> 6#include <linux/gfp.h> 7#include <linux/sched.h> 8#include <linux/debugfs.h> --- 372 unchanged lines hidden (view full) --- 381} 382 383void ceph_put_mds_session(struct ceph_mds_session *s) 384{ 385 dout("mdsc put_session %p %d -> %d\n", s, 386 atomic_read(&s->s_ref), atomic_read(&s->s_ref)-1); 387 if (atomic_dec_and_test(&s->s_ref)) { 388 if (s->s_auth.authorizer) | 1#include <linux/ceph/ceph_debug.h> 2 3#include <linux/fs.h> 4#include <linux/wait.h> 5#include <linux/slab.h> 6#include <linux/gfp.h> 7#include <linux/sched.h> 8#include <linux/debugfs.h> --- 372 unchanged lines hidden (view full) --- 381} 382 383void ceph_put_mds_session(struct ceph_mds_session *s) 384{ 385 dout("mdsc put_session %p %d -> %d\n", s, 386 atomic_read(&s->s_ref), atomic_read(&s->s_ref)-1); 387 if (atomic_dec_and_test(&s->s_ref)) { 388 if (s->s_auth.authorizer) |
389 ceph_auth_destroy_authorizer( 390 s->s_mdsc->fsc->client->monc.auth, 391 s->s_auth.authorizer); | 389 ceph_auth_destroy_authorizer(s->s_auth.authorizer); |
392 kfree(s); 393 } 394} 395 396/* 397 * called under mdsc->mutex 398 */ 399struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, --- 1205 unchanged lines hidden (view full) --- 1605 list_splice_init(&session->s_cap_releases, &tmp_list); 1606 num_cap_releases = session->s_num_cap_releases; 1607 session->s_num_cap_releases = 0; 1608 spin_unlock(&session->s_cap_lock); 1609 1610 while (!list_empty(&tmp_list)) { 1611 if (!msg) { 1612 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, | 390 kfree(s); 391 } 392} 393 394/* 395 * called under mdsc->mutex 396 */ 397struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, --- 1205 unchanged lines hidden (view full) --- 1603 list_splice_init(&session->s_cap_releases, &tmp_list); 1604 num_cap_releases = session->s_num_cap_releases; 1605 session->s_num_cap_releases = 0; 1606 spin_unlock(&session->s_cap_lock); 1607 1608 while (!list_empty(&tmp_list)) { 1609 if (!msg) { 1610 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, |
1613 PAGE_CACHE_SIZE, GFP_NOFS, false); | 1611 PAGE_SIZE, GFP_NOFS, false); |
1614 if (!msg) 1615 goto out_err; 1616 head = msg->front.iov_base; 1617 head->num = cpu_to_le32(0); 1618 msg->front.iov_len = sizeof(*head); 1619 } 1620 cap = list_first_entry(&tmp_list, struct ceph_cap, 1621 session_caps); --- 2273 unchanged lines hidden (view full) --- 3895 int *proto, int force_new) 3896{ 3897 struct ceph_mds_session *s = con->private; 3898 struct ceph_mds_client *mdsc = s->s_mdsc; 3899 struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; 3900 struct ceph_auth_handshake *auth = &s->s_auth; 3901 3902 if (force_new && auth->authorizer) { | 1612 if (!msg) 1613 goto out_err; 1614 head = msg->front.iov_base; 1615 head->num = cpu_to_le32(0); 1616 msg->front.iov_len = sizeof(*head); 1617 } 1618 cap = list_first_entry(&tmp_list, struct ceph_cap, 1619 session_caps); --- 2273 unchanged lines hidden (view full) --- 3893 int *proto, int force_new) 3894{ 3895 struct ceph_mds_session *s = con->private; 3896 struct ceph_mds_client *mdsc = s->s_mdsc; 3897 struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; 3898 struct ceph_auth_handshake *auth = &s->s_auth; 3899 3900 if (force_new && auth->authorizer) { |
3903 ceph_auth_destroy_authorizer(ac, auth->authorizer); | 3901 ceph_auth_destroy_authorizer(auth->authorizer); |
3904 auth->authorizer = NULL; 3905 } 3906 if (!auth->authorizer) { 3907 int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_MDS, 3908 auth); 3909 if (ret) 3910 return ERR_PTR(ret); 3911 } else { --- 82 unchanged lines hidden --- | 3902 auth->authorizer = NULL; 3903 } 3904 if (!auth->authorizer) { 3905 int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_MDS, 3906 auth); 3907 if (ret) 3908 return ERR_PTR(ret); 3909 } else { --- 82 unchanged lines hidden --- |