ksmbd_vfs_link(9)
π ksmbd_vfs_link π
okay so bestie, welcome to the manual page for ksmbd_vfs_link β it's a kernel API manual page (the (9) is giving "kernel internals, not your average command line" energy π§), and honestly? It's a little one but it's iconic.
The vibe in one line: ksmbd_vfs_link is the vfs helper for creating smb hardlink. That's it, that's the whole personality. A tiny little link-maker doing its thing inside the kernel. π
β¨ SYNOPSIS β¨
int ksmbd_vfs_link (struct ksmbd_work *work , const char *oldname ,
const char *newname );
so it takes three things and hands you back an int, no cap. π«Ά
πΈ ARGUMENTS πΈ
workβ the work. that's literally it. it's thestruct ksmbd_work *you're passing in. the manpage is giving minimalist queen and honestly, slay. πoldnameβ the source file name. the thing you're linking from. the main character of this operation. πnewnameβ the hardlink name, and lowkey important detail here: it's relative to share. not a full path, bestie, keep it relative. π
β RETURN β
0 on success β the happy ending, the vibe check passed. π
Otherwise: an error. that's the whole spec and we respect it. π
π¦ SEE ALSO π¦
first up, the kernel file this lives in, shoutout to the source: ./fs/smb/server/vfs.c β the home base, the address, the place where it all happens.
and then the full squad, the whole friend group of vfs helpers, fr fr:
ksmbd_vfs_create(9)ksmbd_vfs_mkdir(9)check_lock_range(9)ksmbd_vfs_read(9)ksmbd_vfs_write(9)ksmbd_vfs_getattr(9)ksmbd_vfs_fsync(9)ksmbd_vfs_remove_file(9)ksmbd_vfs_truncate(9)ksmbd_vfs_listxattr(9)ksmbd_vfs_getxattr(9)ksmbd_vfs_setxattr(9)ksmbd_vfs_set_fadvise(9)ksmbd_vfs_empty_dir(9)ksmbd_vfs_lookup_in_dir(9)ksmbd_vfs_kern_path(9)ksmbd_vfs_kern_path_start_removing(9)ksmbd_vfs_init_kstat(9)
like, eighteen whole functions. ate. π₯
ok tiny heads-up bestie: this page is short and sweet, so there's nothing dangerous or deprecated hiding in it β just three args, a 0-on-success contract, and a friend group of SEE ALSOs. don't invent extra behaviour for it, mkay? π
and that's the page!! π sign-off time: this one comes from ./fs/smb/server, dated October 2026, and it's filed under ksmbd_vfs_link(9) in the Kernel API Manual. mwah. ππ
π¦ 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