summaryrefslogtreecommitdiff
path: root/include/linux/percpu-refcount.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-03-01 01:45:15 -0900
committerKent Overstreet <kent.overstreet@gmail.com>2017-03-08 02:34:33 -0900
commit06b73dbd7ffc0296b2ecea8d3bc55bfeb72d7f2a (patch)
tree1ba37985a18eb2d9a9616ee160c82339e23e2160 /include/linux/percpu-refcount.h
parent171ee48e57be78f4e95954c99851553fa523bf91 (diff)
Diffstat (limited to 'include/linux/percpu-refcount.h')
-rw-r--r--include/linux/percpu-refcount.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index 5a98618..2bbd097 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -180,4 +180,9 @@ static inline bool percpu_ref_is_zero(struct percpu_ref *ref)
return !atomic_long_read(&ref->count);
}
+static inline bool percpu_ref_is_dying(struct percpu_ref *ref)
+{
+ return percpu_ref_is_zero(ref);
+}
+
#endif /* __TOOLS_LINUX_PERCPU_REFCOUNT_H */