]> Pileus Git - ~andy/linux/blobdiff - lib/percpu-refcount.c
don't bother with propagate_mnt() unless the target is shared
[~andy/linux] / lib / percpu-refcount.c
index 1a53d497a8c53ae460686af6107531c4161eae53..963b7034a51b6e43d058ca3b940b2d8cf491ec9f 100644 (file)
@@ -120,6 +120,9 @@ static void percpu_ref_kill_rcu(struct rcu_head *rcu)
 
        atomic_add((int) count - PCPU_COUNT_BIAS, &ref->count);
 
+       WARN_ONCE(atomic_read(&ref->count) <= 0, "percpu ref <= 0 (%i)",
+                 atomic_read(&ref->count));
+
        /* @ref is viewed as dead on all CPUs, send out kill confirmation */
        if (ref->confirm_kill)
                ref->confirm_kill(ref);