ceph: print debug message before put mds session
authorHenry C Chang <henry.cy.chang@gmail.com>
Wed, 11 May 2011 10:29:52 +0000 (10:29 +0000)
committerSage Weil <sage@newdream.net>
Wed, 11 May 2011 17:44:34 +0000 (10:44 -0700)
The mds session, s, could be freed during ceph_put_mds_session.
Move dout before ceph_put_mds_session.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/mds_client.c

index f60b07b0feb075042e91c3cdabea569bd01ee158..d0fae4ce9ba55b704ccedadbfd3f298e3a00cfb4 100644 (file)
@@ -3304,8 +3304,8 @@ static void con_put(struct ceph_connection *con)
 {
        struct ceph_mds_session *s = con->private;
 
+       dout("mdsc con_put %p (%d)\n", s, atomic_read(&s->s_ref) - 1);
        ceph_put_mds_session(s);
-       dout("mdsc con_put %p (%d)\n", s, atomic_read(&s->s_ref));
 }
 
 /*