|
@@ -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;
|