diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-30 11:56:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-30 11:56:39 -0400 |
commit | b612a0553714c6b9744ad0d03f10cac78f3a84b1 (patch) | |
tree | 9dfb5cb5d13c187ff1f54448f8441512203625d0 /fs/ceph/mon_client.c | |
parent | 52b0ace7dfe8f70350218017a95d7cab1eb41fbb (diff) | |
parent | 2a8e5e3637e2fc058798f5d3626f525729ffaaaf (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: clean up on forwarded aborted mds request
ceph: fix leak of osd authorizer
ceph: close out mds, osd connections before stopping auth
ceph: make lease code DN specific
fs/ceph: Use ERR_CAST
ceph: renew auth tickets before they expire
ceph: do not resend mon requests on auth ticket renewal
ceph: removed duplicated #includes
ceph: avoid possible null dereference
ceph: make mds requests killable, not interruptible
sched: add wait_for_completion_killable_timeout
Diffstat (limited to 'fs/ceph/mon_client.c')
-rw-r--r-- | fs/ceph/mon_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index f6510a476e7..21c62e9b7d1 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c | |||
@@ -704,8 +704,11 @@ static void handle_auth_reply(struct ceph_mon_client *monc, | |||
704 | struct ceph_msg *msg) | 704 | struct ceph_msg *msg) |
705 | { | 705 | { |
706 | int ret; | 706 | int ret; |
707 | int was_auth = 0; | ||
707 | 708 | ||
708 | mutex_lock(&monc->mutex); | 709 | mutex_lock(&monc->mutex); |
710 | if (monc->auth->ops) | ||
711 | was_auth = monc->auth->ops->is_authenticated(monc->auth); | ||
709 | monc->pending_auth = 0; | 712 | monc->pending_auth = 0; |
710 | ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base, | 713 | ret = ceph_handle_auth_reply(monc->auth, msg->front.iov_base, |
711 | msg->front.iov_len, | 714 | msg->front.iov_len, |
@@ -716,7 +719,7 @@ static void handle_auth_reply(struct ceph_mon_client *monc, | |||
716 | wake_up(&monc->client->auth_wq); | 719 | wake_up(&monc->client->auth_wq); |
717 | } else if (ret > 0) { | 720 | } else if (ret > 0) { |
718 | __send_prepared_auth_request(monc, ret); | 721 | __send_prepared_auth_request(monc, ret); |
719 | } else if (monc->auth->ops->is_authenticated(monc->auth)) { | 722 | } else if (!was_auth && monc->auth->ops->is_authenticated(monc->auth)) { |
720 | dout("authenticated, starting session\n"); | 723 | dout("authenticated, starting session\n"); |
721 | 724 | ||
722 | monc->client->msgr->inst.name.type = CEPH_ENTITY_TYPE_CLIENT; | 725 | monc->client->msgr->inst.name.type = CEPH_ENTITY_TYPE_CLIENT; |