summaryrefslogtreecommitdiff
path: root/include/linux/lockref.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2026-02-09 17:33:26 +0100
committerJiri Kosina <jkosina@suse.com>2026-02-09 17:33:26 +0100
commitec496f77b4c11036cc835d6f045fb5e5ef1e6530 (patch)
treee0f5a8f9ffec9de060b7b617514daecc8bdaca6d /include/linux/lockref.h
parent984d6f361d19486fcd8fc13d29112fe73123f482 (diff)
parentae40ace015be442837934c5028a8eba7fe3cd98f (diff)
Merge branch 'for-6.20/sony' into for-linus
- Support for Rock band 4 PS4 and PS5 guitars (Rosalie Wanders)
Diffstat (limited to 'include/linux/lockref.h')
-rw-r--r--include/linux/lockref.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lockref.h b/include/linux/lockref.h
index 676721ee878d..815d871fadfc 100644
--- a/include/linux/lockref.h
+++ b/include/linux/lockref.h
@@ -50,6 +50,8 @@ void lockref_get(struct lockref *lockref);
int lockref_put_return(struct lockref *lockref);
bool lockref_get_not_zero(struct lockref *lockref);
bool lockref_put_or_lock(struct lockref *lockref);
+#define lockref_put_or_lock(_lockref) \
+ (!__cond_lock((_lockref)->lock, !lockref_put_or_lock(_lockref)))
void lockref_mark_dead(struct lockref *lockref);
bool lockref_get_not_dead(struct lockref *lockref);