osd_client.c (1cbc99dfe5d7d686fd022647f4e489b5eb8e9068) | osd_client.c (6c1ea260f89709e0021d2c59f8fd2a104b5b1123) |
---|---|
1 2#include <linux/ceph/ceph_debug.h> 3 4#include <linux/module.h> 5#include <linux/err.h> 6#include <linux/highmem.h> 7#include <linux/mm.h> 8#include <linux/pagemap.h> --- 1073 unchanged lines hidden (view full) --- 1082 } 1083} 1084 1085static void put_osd(struct ceph_osd *osd) 1086{ 1087 dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref), 1088 atomic_read(&osd->o_ref) - 1); 1089 if (atomic_dec_and_test(&osd->o_ref)) { | 1 2#include <linux/ceph/ceph_debug.h> 3 4#include <linux/module.h> 5#include <linux/err.h> 6#include <linux/highmem.h> 7#include <linux/mm.h> 8#include <linux/pagemap.h> --- 1073 unchanged lines hidden (view full) --- 1082 } 1083} 1084 1085static void put_osd(struct ceph_osd *osd) 1086{ 1087 dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref), 1088 atomic_read(&osd->o_ref) - 1); 1089 if (atomic_dec_and_test(&osd->o_ref)) { |
1090 struct ceph_auth_client *ac = osd->o_osdc->client->monc.auth; 1091 | |
1092 if (osd->o_auth.authorizer) | 1090 if (osd->o_auth.authorizer) |
1093 ceph_auth_destroy_authorizer(ac, osd->o_auth.authorizer); | 1091 ceph_auth_destroy_authorizer(osd->o_auth.authorizer); |
1094 kfree(osd); 1095 } 1096} 1097 1098/* 1099 * remove an osd from our map 1100 */ 1101static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) --- 1877 unchanged lines hidden (view full) --- 2979 int *proto, int force_new) 2980{ 2981 struct ceph_osd *o = con->private; 2982 struct ceph_osd_client *osdc = o->o_osdc; 2983 struct ceph_auth_client *ac = osdc->client->monc.auth; 2984 struct ceph_auth_handshake *auth = &o->o_auth; 2985 2986 if (force_new && auth->authorizer) { | 1092 kfree(osd); 1093 } 1094} 1095 1096/* 1097 * remove an osd from our map 1098 */ 1099static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) --- 1877 unchanged lines hidden (view full) --- 2977 int *proto, int force_new) 2978{ 2979 struct ceph_osd *o = con->private; 2980 struct ceph_osd_client *osdc = o->o_osdc; 2981 struct ceph_auth_client *ac = osdc->client->monc.auth; 2982 struct ceph_auth_handshake *auth = &o->o_auth; 2983 2984 if (force_new && auth->authorizer) { |
2987 ceph_auth_destroy_authorizer(ac, auth->authorizer); | 2985 ceph_auth_destroy_authorizer(auth->authorizer); |
2988 auth->authorizer = NULL; 2989 } 2990 if (!auth->authorizer) { 2991 int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_OSD, 2992 auth); 2993 if (ret) 2994 return ERR_PTR(ret); 2995 } else { --- 58 unchanged lines hidden --- | 2986 auth->authorizer = NULL; 2987 } 2988 if (!auth->authorizer) { 2989 int ret = ceph_auth_create_authorizer(ac, CEPH_ENTITY_TYPE_OSD, 2990 auth); 2991 if (ret) 2992 return ERR_PTR(ret); 2993 } else { --- 58 unchanged lines hidden --- |