summary refs log tree commit diff
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-25 12:38:57 -0800
committerSage Weil <sage@newdream.net>2010-02-25 12:38:57 -0800
commit161fd65ac934608345aed35226fc889ea3b0b500 (patch)
tree7e216c47fde0c06b0349adabe1d1363d9b71e74b /fs/ceph
parent88d892a37fc231ab2aa3b1c40ca9d67224616594 (diff)
downloadlinux-161fd65ac934608345aed35226fc889ea3b0b500.tar.gz
ceph: invalidate_authorizer without con->mutex held
This fixes lock ABBA inversion, as the ->invalidate_authorizer()
op may need to take a lock (or even call back into the
messenger).

Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/messenger.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index fdda707aa137..9ea7b763c8dc 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -1853,14 +1853,6 @@ static void ceph_fault(struct ceph_connection *con)
 		con->in_msg = NULL;
 	}
 
-	/*
-	 * in case we faulted due to authentication, invalidate our
-	 * current tickets so that we can get new ones.
-         */
-	if (con->auth_retry && con->ops->invalidate_authorizer) {
-		dout("calling invalidate_authorizer()\n");
-		con->ops->invalidate_authorizer(con);
-	}
 
 	/* If there are no messages in the queue, place the connection
 	 * in a STANDBY state (i.e., don't try to reconnect just yet). */
@@ -1890,6 +1882,15 @@ static void ceph_fault(struct ceph_connection *con)
 out_unlock:
 	mutex_unlock(&con->mutex);
 out:
+	/*
+	 * in case we faulted due to authentication, invalidate our
+	 * current tickets so that we can get new ones.
+         */
+	if (con->auth_retry && con->ops->invalidate_authorizer) {
+		dout("calling invalidate_authorizer()\n");
+		con->ops->invalidate_authorizer(con);
+	}
+
 	if (con->ops->fault)
 		con->ops->fault(con);
 }