cifs_get_tcon(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– cifs_get_tcon(9) πŸ’–

okay so welcome to the Kernel API Manual bestie, this one's a kernel function page and it's lowkey a refcounting girlie πŸŽ€


✨ NAME ✨

cifs_get_tcon β€” get a tcon matching @ctx data from @ses πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cifs_tcon * cifs_get_tcon (struct cifs_ses *ses , struct
       smb3_fs_context *ctx );

🌸 ARGUMENTS 🌸

  • ses β€” the smb session to issue the request on 🫢
  • ctx β€” the superblock configuration context to use for building the
yes bestie the original sentence just trails off there, we don't make the rules, we just report them πŸ™ˆ

⭐ DESCRIPTION ⭐

so here's the situation, and it's giving refcount bookkeeping πŸ”₯

  • the tcon refcount is literally the number of mount points using the tcon
  • the ses refcount is the number of tcon using the session
  1. this function assumes it is being called from cifs_mount where we already got a session reference (ses refcount +1) πŸ’€
  2. since we're in the context of adding a mount point, the end result should be either:

a) a new tcon already allocated with refcount=1 (1 mount point) and its session refcount incremented (1 new tcon). this +1 was already done in (1) ✨

b) an existing tcon with refcount+1 (add a mount point to it) and identical ses refcount (no new tcon). because of (1) we need to decrement the ses refcount πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page bestie, no cap πŸ“ this icon came from ./fs/smb/client and it's dated October 2026 β€” periodt, go forth and refcount responsibly πŸ’–πŸŒˆ

πŸ“¦ where this page comes from