From 89836033e22f37d021fae878144da479b741caad Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Fri, 8 Jul 2011 09:35:47 -0700 Subject: [PATCH] LU-488 ptlrpc_connection_put() LASSERT(!cfs_hlist_unhashed(&conn->c_hash)) Connection hash may be rehashed while ptlrpc_connection_put() is called, ASSERT &conn->c_refcount > 1 instead of this. Signed-off-by: Lai Siyao Change-Id: Iec6d35419e0c4d8497bd0b84c6210abc8eb23882 Reviewed-on: http://review.whamcloud.com/1074 Tested-by: Hudson Reviewed-by: Li Wei Tested-by: Maloo Reviewed-by: Prakash Surya Reviewed-by: zhen liang Reviewed-by: Oleg Drokin --- lustre/ptlrpc/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c index 00b37a9..c87569e 100644 --- a/lustre/ptlrpc/connection.c +++ b/lustre/ptlrpc/connection.c @@ -97,7 +97,7 @@ int ptlrpc_connection_put(struct ptlrpc_connection *conn) if (!conn) RETURN(rc); - LASSERT(!cfs_hlist_unhashed(&conn->c_hash)); + LASSERT(cfs_atomic_read(&conn->c_refcount) > 1); /* * We do not remove connection from hashtable and -- 1.8.3.1