diff options
author | Sage Weil <sage@inktank.com> | 2012-05-31 23:27:50 -0400 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-06-06 10:23:54 -0400 |
commit | ec87ef4309d33bd9c87a53bb5152a86ae7a65f25 (patch) | |
tree | f29f8f22633a61d8183afc889f866268a460225e /net/ceph | |
parent | 67130934fb579fdf0f2f6d745960264378b57dc8 (diff) |
libceph: drop connection refcounting for mon_client
All references to the embedded ceph_connection come from the msgr
workqueue, which is drained prior to mon_client destruction. That
means we can ignore con refcounting entirely.
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/mon_client.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index ac4d6b100730..062b72478077 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c | |||
@@ -1029,9 +1029,23 @@ out: | |||
1029 | mutex_unlock(&monc->mutex); | 1029 | mutex_unlock(&monc->mutex); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | /* | ||
1033 | * We can ignore refcounting on the connection struct, as all references | ||
1034 | * will come from the messenger workqueue, which is drained prior to | ||
1035 | * mon_client destruction. | ||
1036 | */ | ||
1037 | static struct ceph_connection *con_get(struct ceph_connection *con) | ||
1038 | { | ||
1039 | return con; | ||
1040 | } | ||
1041 | |||
1042 | static void con_put(struct ceph_connection *con) | ||
1043 | { | ||
1044 | } | ||
1045 | |||
1032 | static const struct ceph_connection_operations mon_con_ops = { | 1046 | static const struct ceph_connection_operations mon_con_ops = { |
1033 | .get = ceph_con_get, | 1047 | .get = con_get, |
1034 | .put = ceph_con_put, | 1048 | .put = con_put, |
1035 | .dispatch = dispatch, | 1049 | .dispatch = dispatch, |
1036 | .fault = mon_fault, | 1050 | .fault = mon_fault, |
1037 | .alloc_msg = mon_alloc_msg, | 1051 | .alloc_msg = mon_alloc_msg, |