kref_put_mutex(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

kref_put_mutex β€” decrement refcount for object, periodt. πŸ’…

This is the kref_put_mutex(9) page from the Kernel API Manual, and bestie, it's lowkey iconic. 🫢

🌸 SYNOPSIS 🌸

int kref_put_mutex (struct kref *kref , void (*release)(struct kref *kref) , struct mutex *mutex );

πŸŽ€ ARGUMENTS πŸŽ€

  • kref β€” the object in question, bestie. πŸ’–
  • release β€” a pointer to the function that will clean up the object when the last reference to the object is released. πŸ”₯
  • mutex β€” the mutex which protects the release function. πŸ¦‹

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this is a variant of kref_lock, and the vibe is: it calls the release function with the mutex held. πŸ”₯ Then the release function will release the mutex β€” that's the whole bit, no cap. πŸ’…

🌈 SEE ALSO 🌈

Kernel file ./include/linux/kref.h, plus these besties: kref_init(9), kref_get(9), kref_put(9), kref_put_lock(9), and kref_get_unless_zero(9). πŸ’–


mwah πŸ’‹ β€” source/version: ./include/linux, date: October 2026, page: kref_put_mutex(9). Stay slaying, bestie! 🫢

πŸ“¦ where this page comes from