Skip to content

RFC refcount: attempt to avoid imbalance warnings

Alexander Aring cluster-devel linux-sparse lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2refcount: add __cond_lock() for conditional lock refcount APIinclude/linux/refcount.h lib/refcount.c+28 -161 reply
2/2kref: move kref_put_lock() callback to callerinclude/linux/kref.h+8 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] refcount: attempt to avoid imbalance warnings

Hi,

This patch tries to avoid some sparse warnings related to refcount_dec_and_lock() and kref_put_lock().

I send this patch series as RFC because it was necessary to do a kref change after adding __cond_lock() to refcount_dec_and_lock() functionality.

For me it looks like we do a lot of acrobatics to avoid sparse warnings here and I really don't know if it's worth the offer. However this is what I have now...

- Alex

Alexander Aring (2):
refcount: add __cond_lock() for conditional lock refcount API
kref: move kref_put_lock() callback to caller

 include/linux/kref.h     | 24 ++++++++----------------
 include/linux/refcount.h | 21 ++++++++++++++++-----
 lib/refcount.c           | 23 ++++++++++++-----------
 3 files changed, 36 insertions(+), 32 deletions(-)
Signature · 1 line
2.31.1