nfsd_link(9)
π nfsd_link β create a link β¨
okay so bestie, welcome to nfsd_link, straight out of the Kernel API Manual (that's section 9 of the kernel manuals, iykyk) β it's the little guy that makes a link, and honestly it's kind of iconic.
πΈ SYNOPSIS πΈ
__be32 nfsd_link (struct svc_rqst *rqstp , struct svc_fh *ffhp , char
*name , int len , struct svc_fh *tfhp );
like, look at that signature. so much going on. slay. π
π¦ ARGUMENTS π¦
rqstpβ the RPC transaction context. your main character passport, basically.ffhpβ the file handle of the directory where the new link is gonna be created. this is the where.nameβ the filename of the new link. this is the what.lenβ the length ofname, measured in octets. yes, octets. not vibes. octets. π«Άtfhpβ the file handle of an existing file object. this is the who's getting linked.
π DESCRIPTION π
okay so listen closely because this part is lowkey important: after this call _both_ ffhp and tfhp need an fh_put. BOTH. like not one, not the other, both. do not leave a file handle hanging, it's giving bad manners. π
and what does it give you back? a generic NFS status code in network byte-order β¨ (which is the fancy way of saying "big-endian, don't @ me").
fr fr, that fh_put on both handles is not a suggestion, bestie. it's the whole vibe check. π₯
π SEE ALSO π
so there's a whole friend group here, and nfsd_link is not the only one in the group chat:
- Kernel file
./fs/nfsd/vfs.c nfserrno(9)nfsd_lookup(9)nfsd_setattr(9)nfsd4_is_junction(9)nfsd_open_verified(9)nfsd_splice_read(9)nfsd_iter_read(9)nfsd_vfs_write(9)nfsd_read_splice_ok(9)nfsd_read(9)nfsd_write(9)nfsd_commit(9)nfsd_create_setattr(9)nfsd_symlink(9)nfsd_rename(9)nfsd_unlink(9)nfsd_readdir(9)nfsd_filp_close(9)nfsd_removexattr(9)nfsd_get_case_info(9)
π not the full roster. twenty whole entries. they ate and left no crumbs.
nfsd_link(9) lives in ./fs/nfsd, it's dated October 2026, and it's from the Kernel API Manual β k that's the whole page, ily, go put your file handles back πΈπ¦π
π¦ 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