diff mbox

[1/3] ceph: print debug message before put mds session

Message ID 1305109794-7967-1-git-send-email-henry.cy.chang@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Henry Chang May 11, 2011, 10:29 a.m. UTC
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>
---
 fs/ceph/mds_client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Sage Weil May 11, 2011, 5:30 p.m. UTC | #1
Applied all three of these.  Thanks, Henry!  I'll send them to Linus today 
or tomorrow so they'll make 2.6.39.

sage


On Wed, 11 May 2011, Henry C Chang wrote:

> 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>
> ---
>  fs/ceph/mds_client.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index f60b07b..d0fae4c 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -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));
>  }
>  
>  /*
> -- 
> 1.7.2.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index f60b07b..d0fae4c 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -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));
 }
 
 /*