nfsd_file_acquire_local(9)
π nfsd_file_acquire_local(9) π
okay bestie, welcome to the Kernel API Manual β this one's a nfsd girlie and she is lowkey powerful, so buckle up π
β¨ NAME β¨
nfsd_file_acquire_local β get a struct nfsd_file with an open file for localio π¦
πΈ SYNOPSIS πΈ
__be32 nfsd_file_acquire_local (struct net *net , struct svc_cred *cred
, struct auth_domain *client , struct svc_fh *fhp , unsigned int
may_flags , struct nfsd_file **pnf );
π ARGUMENTS π
netβ the network namespace where we do the lookup, like, the where of it all πcredβ the user credential we validate access with, aka who's asking πclientβ theauth_domainused for the LOCALIO lookup π«Άfhpβ the NFS filehandle of the file to be opened, the actual address of the thing π¬may_flagsβ theNFSD_MAY_settings for the file, like the permission vibe check βpnfβ OUT: the new or foundstruct nfsd_fileobject, this is where the good stuff lands β¨
π DESCRIPTION π
so this file lookup interface gives you access to a file given the filehandle and the credential π« No connection-based authorisation is performed β none, zero, nada β and honestly that's what makes it quite different to other file access mediated by nfsd. Not me pointing that out dramatically, it's literally the manpage's whole thing π
It lets a kernel module (think: the NFS client) reach across network and filesystem namespaces to access a file. Cross-namespace reach, main character energy π
π for real though: the security implications of this should be carefully considered before use. Like, carefully carefully. This is not a "yolo it and ship" situation, bestie. π
The nfsd_file_object returned by this API is reference-counted but not garbage-collected π The object is unhashed after the final nfsd_file_put.
Return values, since you asked:
nfs_okβpnfpoints to annfsd_filewith its reference count boosted π- on error, an
nfsstatvalue in network byte order is returned π¦ (yes, network byte order, do not come for me)
π¦ SEE ALSO π¦
Kernel file ./fs/nfsd/filecache.c β and the whole entourage, fr fr:
nfsd_file_check_write_error(9)nfsd_file_put(9)nfsd_file_put_local(9)nfsd_file_file(9)nfsd_file_dispose_list_delayed(9)nfsd_file_net_dispose(9)nfsd_file_lru_cb(9)nfsd_file_cond_queue(9)nfsd_file_queue_for_close(9)nfsd_file_close_inode(9)nfsd_file_close_inode_sync(9)nfsd_file_close_export(9)__nfsd_file_cache_purge(9)nfsd_file_cache_purge(9)nfsd_file_is_cached(9)nfsd_file_acquire_gc(9)nfsd_file_acquire(9)nfsd_file_acquire_opened(9)nfsd_file_acquire_dir(9)nfsd_fsnotify_recalc_mask(9)
okay that's the whole page, go forth and namespace responsibly π§ββοΈπ
β compliments of the ./fs/nfsd source, dated October 2026, serving you nfsd_file_acquire_local(9) realness, periodt π
β
π¦ 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