summaryrefslogtreecommitdiff
path: root/include/linux/lockref.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-03-29 10:07:46 +0300
committerBob Peterson <rpeterso@redhat.com>2018-04-12 19:41:19 +0300
commit450b1f6f56350c630e795f240dc5a77aa8aa2419 (patch)
treed6809eb52cf4317836ddc5e51f582a72bb2a9c9a /include/linux/lockref.h
parente241e3f2bf975788a1b70dff2eb5180ca395b28e (diff)
downloadlinux-450b1f6f56350c630e795f240dc5a77aa8aa2419.tar.xz
lockref: Add lockref_put_not_zero
Put a lockref unless the lockref is dead or its count would become zero. This is the same as lockref_put_or_lock except that the lock is never left held. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r--include/linux/lockref.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/lockref.h b/include/linux/lockref.h
index 2eac32095113..99f17cc8e163 100644
--- a/include/linux/lockref.h
+++ b/include/linux/lockref.h
@@ -37,6 +37,7 @@ struct lockref {
extern void lockref_get(struct lockref *);
extern int lockref_put_return(struct lockref *);
extern int lockref_get_not_zero(struct lockref *);
+extern int lockref_put_not_zero(struct lockref *);
extern int lockref_get_or_lock(struct lockref *);
extern int lockref_put_or_lock(struct lockref *);