diff options
author | Sage Weil <sage@newdream.net> | 2010-05-27 17:15:49 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-29 12:42:04 -0400 |
commit | 79494d1b9b92259eb40ea6e939ba5aff4b8de5f1 (patch) | |
tree | 4e646e85059ba65083896ba3454b9a30a146b6ff | |
parent | a922d38fd10d55d5033f10df15baf966e8f5b18c (diff) |
ceph: fix leak of osd authorizer
Release the ceph_authorizer when releasing osd state.
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/ceph/osd_client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index afa7bb3895c4..d25b4add85b4 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -361,8 +361,13 @@ static void put_osd(struct ceph_osd *osd) | |||
361 | { | 361 | { |
362 | dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref), | 362 | dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref), |
363 | atomic_read(&osd->o_ref) - 1); | 363 | atomic_read(&osd->o_ref) - 1); |
364 | if (atomic_dec_and_test(&osd->o_ref)) | 364 | if (atomic_dec_and_test(&osd->o_ref)) { |
365 | struct ceph_auth_client *ac = osd->o_osdc->client->monc.auth; | ||
366 | |||
367 | if (osd->o_authorizer) | ||
368 | ac->ops->destroy_authorizer(ac, osd->o_authorizer); | ||
365 | kfree(osd); | 369 | kfree(osd); |
370 | } | ||
366 | } | 371 | } |
367 | 372 | ||
368 | /* | 373 | /* |