cifs_get_tcon(9)
π 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
- this function assumes it is being called from
cifs_mountwhere we already got a session reference (sesrefcount +1) π - 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 π
- Kernel file
./fs/smb/client/connect.ccifs_setup_ipc(9),cifs_get_smb_ses(9)π§
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms