From 450b1f6f56350c630e795f240dc5a77aa8aa2419 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Thu, 29 Mar 2018 08:07:46 +0100 Subject: 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 Signed-off-by: Bob Peterson --- include/linux/lockref.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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 *); -- cgit v1.2.3-59-g8ed1b