ksmbd_conn_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ksmbd_conn_put(9) β€” the kernel API manual, bestie edition ✨

okay so like, welcome to the glow-up of ksmbd_conn_put(9) πŸŽ€ yes that's the kernel API manual page, and yes it's lowkey iconic. we're dropping references today. stay with me.


✨ NAME ✨

ksmbd_conn_put β€” drop a reference, and if that was literally the last one, queue the release onto ksmbd_conn_wq so it runs from process context. periodt. πŸ’…


✨ SYNOPSIS ✨

void ksmbd_conn_put (struct ksmbd_conn *conn );

✨ ARGUMENTS ✨

  • conn β€” the connection instance you're putting a reference to 🫢 like, this is the one you're letting go of.

✨ DESCRIPTION ✨

bestie listen, this is the good part πŸ”₯ you can call this from any context β€” and I mean any β€” including RCU softirq callbacks and non-sleeping locks. the way that it just handles it?? because the actual release is deferred to the workqueue, so nobody's out here sleeping in a softirq. no cap. 😭

ksmbd_conn_wq is created in ksmbd_server_init before any conn can even be allocated, and it's destroyed in ksmbd_server_exit after rcu_barrier β€” so it is always non-NULL while a conn reference is held. it's giving guaranteed-valid-pointer main character energy πŸ‘‘βœ¨

fr fr though, that ordering is the whole vibe check of this function β€” the workqueue outlives every possible conn, so the deferred release always has somewhere safe to land πŸ¦‹

✨ SEE ALSO ✨


and that's the page, bestie 🫢 mwah πŸ’– this one lives in ./fs/smb/server and it's dated October 2026 β€” so yeah, she's from the future and she's slaying. iykyk 🌈✨

πŸ“¦ where this page comes from