summaryrefslogtreecommitdiff
path: root/net/ceph/mon_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 10:26:14 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-20 11:58:47 -0700
commitaa80dd9dbe86743ae6e52c836f6ab1472c469927 (patch)
tree1b5a77428bc53dd4cf0988c6328bbea34adaee1f /net/ceph/mon_client.c
parent29c65a277a64645af853e8c9a9b3dda0ddc421e0 (diff)
downloadlinux-3.10-aa80dd9dbe86743ae6e52c836f6ab1472c469927.tar.gz
linux-3.10-aa80dd9dbe86743ae6e52c836f6ab1472c469927.tar.bz2
linux-3.10-aa80dd9dbe86743ae6e52c836f6ab1472c469927.zip
libceph: wrap auth ops in wrapper functions
commit 27859f9773e4a0b2042435b13400ee2c891a61f4 upstream. Use wrapper functions that check whether the auth op exists so that callers do not need a bunch of conditional checks. Simplifies the external interface. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ceph/mon_client.c')
-rw-r--r--net/ceph/mon_client.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 89a6409b4e1..6765da36f78 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -737,7 +737,7 @@ static void delayed_work(struct work_struct *work)
__validate_auth(monc);
- if (monc->auth->ops->is_authenticated(monc->auth))
+ if (ceph_auth_is_authenticated(monc->auth))
__send_subscribe(monc);
}
__schedule_delayed(monc);
@@ -893,8 +893,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
mutex_lock(&monc->mutex);
had_debugfs_info = have_debugfs_info(monc);
- if (monc->auth->ops)
- was_auth = monc->auth->ops->is_authenticated(monc->auth);
+ was_auth = ceph_auth_is_authenticated(monc->auth);
monc->pending_auth = 0;
ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base,
msg->front.iov_len,
@@ -905,7 +904,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc,
wake_up_all(&monc->client->auth_wq);
} else if (ret > 0) {
__send_prepared_auth_request(monc, ret);
- } else if (!was_auth && monc->auth->ops->is_authenticated(monc->auth)) {
+ } else if (!was_auth && ceph_auth_is_authenticated(monc->auth)) {
dout("authenticated, starting session\n");
monc->client->msgr.inst.name.type = CEPH_ENTITY_TYPE_CLIENT;