nfsd_file_acquire_gc(9)
π NAME π
nfsd_file_acquire_gc β bestie, this is how you get a struct nfsd_file that has an open file attached π«Ά
β¨ SYNOPSIS β¨
__be32 nfsd_file_acquire_gc (struct svc_rqst *rqstp , struct svc_fh *fhp
, unsigned int may_flags , struct nfsd_file **pnf );
π ARGUMENTS π
rqstpβ the RPC transaction that's currently being executed, aka the main character of this call πfhpβ the NFS filehandle of the file you want opened π₯may_flagsβ theNFSD_MAY_settings for the file, so it knows what it's allowed to do β¨pnfβ OUT parameter: the new-or-found"struct nfsd_file"object lands here π¦
πΈ DESCRIPTION πΈ
Okay so the nfsd_file object this API hands back is reference-counted and garbage-collected. It sticks around for a few seconds after the final nfsd_file_put, just in case the caller wants to re-use it. Lowkey thoughtful of it, honestly π
Return values, bestie: nfs_ok means pnf points to an nfsd_file with its reference count boosted. Periodt.
On error, an nfsstat value in network byte order is returned. Not me stressing over byte order π
π SEE ALSO π
Kernel file ./fs/nfsd/filecache.c
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(9)nfsd_file_acquire_local(9)nfsd_file_acquire_opened(9)nfsd_file_acquire_dir(9)nfsd_fsnotify_recalc_mask(9)
That's the whole vibe check, bestie β sourced from ./fs/nfsd, dated October 2026. Go be iconic with your filehandles πβ¨
π¦ 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