ceph: drop messages on unregistered mds sessions; cleanup
Verify the mds session is currently registered before handling
incoming messages. Clean up message handlers to pull mds out
of session->s_mds instead of less trustworthy src field.
Clean up con_{get,put} debug output.
Signed-off-by: Sage Weil <sage@newdream.net>
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index b6154ff..bb84616 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -2600,7 +2600,7 @@
struct inode *inode;
struct ceph_cap *cap;
struct ceph_mds_caps *h;
- int mds = le64_to_cpu(msg->hdr.src.name.num);
+ int mds = session->s_mds;
int op;
u32 seq;
struct ceph_vino vino;