projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb71e0
)
libceph: kfree() in put_osd() shouldn't depend on authorizer
author
Ilya Dryomov
<
[email protected]
>
Mon, 16 Feb 2015 08:49:42 +0000
(11:49 +0300)
committer
Ilya Dryomov
<
[email protected]
>
Thu, 19 Feb 2015 11:27:51 +0000
(14:27 +0300)
a255651d4cad
("ceph: ensure auth ops are defined before use") made
kfree() in put_osd() conditional on the authorizer. A mechanical
mistake most likely - fix it.
Cc: Alex Elder <
[email protected]
>
Signed-off-by: Ilya Dryomov <
[email protected]
>
Reviewed-by: Sage Weil <
[email protected]
>
Reviewed-by: Alex Elder <
[email protected]
>
net/ceph/osd_client.c
patch
|
blob
|
history
diff --git
a/net/ceph/osd_client.c
b/net/ceph/osd_client.c
index f693a2f8ac86f32edaf8a8a30079d053cad50549..41a4abc7e98eebfd36487d6d381f680732d4cd68 100644
(file)
--- a/
net/ceph/osd_client.c
+++ b/
net/ceph/osd_client.c
@@
-1035,10
+1035,11
@@
static void put_osd(struct ceph_osd *osd)
{
dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref),
atomic_read(&osd->o_ref) - 1);
- if (atomic_dec_and_test(&osd->o_ref)
&& osd->o_auth.authorizer
) {
+ if (atomic_dec_and_test(&osd->o_ref)) {
struct ceph_auth_client *ac = osd->o_osdc->client->monc.auth;
- ceph_auth_destroy_authorizer(ac, osd->o_auth.authorizer);
+ if (osd->o_auth.authorizer)
+ ceph_auth_destroy_authorizer(ac, osd->o_auth.authorizer);
kfree(osd);
}
}