]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/percpu_counter.h
Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap...
[mv-sheeva.git] / include / linux / percpu_counter.h
index 46f6ba56fa9139909c04acbad98383b7ed88babb..5edc9014263aca9e10cfda70dc4c5e3e8a94f8bb 100644 (file)
@@ -75,7 +75,7 @@ static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
        barrier();              /* Prevent reloads of fbc->count */
        if (ret >= 0)
                return ret;
-       return 1;
+       return 0;
 }
 
 static inline int percpu_counter_initialized(struct percpu_counter *fbc)
@@ -133,6 +133,10 @@ static inline s64 percpu_counter_read(struct percpu_counter *fbc)
        return fbc->count;
 }
 
+/*
+ * percpu_counter is intended to track positive numbers. In the UP case the
+ * number should never be negative.
+ */
 static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
 {
        return fbc->count;