Whamcloud - gitweb
LU-554 add gnilnd awareness to LNet
[fs/lustre-release.git] / lustre / ldlm / ldlm_pool.c
index 2749a76..23e847b 100644 (file)
@@ -28,6 +28,9 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011 Whamcloud, Inc.
+ *
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -1264,9 +1267,9 @@ void ldlm_pools_recalc(ldlm_side_t client)
                 cfs_spin_lock(&ns->ns_lock);
                 /*
                  * skip ns which is being freed, and we don't want to increase
-                 * its refcount again, not even temporarily. bz21519.
+                 * its refcount again, not even temporarily. bz21519 & LU-499.
                  */
-                if (cfs_atomic_read(&ns->ns_bref) == 0) {
+                if (ns->ns_stopping) {
                         skip = 1;
                 } else {
                         skip = 0;