Whamcloud - gitweb
LU-488 ptlrpc_connection_put() LASSERT(!cfs_hlist_unhashed(&conn->c_hash))
authorLai Siyao <laisiyao@whamcloud.com>
Fri, 8 Jul 2011 16:35:47 +0000 (09:35 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Oct 2011 21:45:59 +0000 (17:45 -0400)
Connection hash may be rehashed while ptlrpc_connection_put() is
called, ASSERT &conn->c_refcount > 1 instead of this.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iec6d35419e0c4d8497bd0b84c6210abc8eb23882
Reviewed-on: http://review.whamcloud.com/1074
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: zhen liang <liang.zhen@live.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/connection.c

index 00b37a9..c87569e 100644 (file)
@@ -97,7 +97,7 @@ int ptlrpc_connection_put(struct ptlrpc_connection *conn)
         if (!conn)
                 RETURN(rc);
 
         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
 
         /*
          * We do not remove connection from hashtable and