ceph: use connection mutex to protect read and write stages
Use a single mutex (previously out_mutex) to protect both read and write
activity from concurrent ceph_con_* calls. Drop the mutex when doing
callbacks to avoid nested locking (the callback may need to call something
like ceph_con_close).
Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h
index e04c214..94b55de 100644
--- a/fs/ceph/messenger.h
+++ b/fs/ceph/messenger.h
@@ -155,8 +155,9 @@
void *auth_reply_buf; /* where to put the authorizer reply */
int auth_reply_buf_len;
+ struct mutex mutex;
+
/* out queue */
- struct mutex out_mutex;
struct list_head out_queue;
struct list_head out_sent; /* sending or sent but unacked */
u64 out_seq; /* last message queued for send */