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>
This commit is contained in:

committed by
Bob Peterson

parent
e241e3f2bf
commit
450b1f6f56
@@ -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 *);
|
||||
|
||||
|
Reference in New Issue
Block a user