nfsd_file_acquire_dir(9)
π nfsd_file_acquire_dir(9) β¨
okay bestie, welcome to the Kernel API Manual page for nfsd_file_acquire_dir(9) β yes, she's a function, yes she's iconic, and yes we're gonna get through this together π«Ά
πΈ NAME πΈ
nfsd_file_acquire_dir β get a struct nfsd_file with an open directory π
π¦ SYNOPSIS π¦
__be32 nfsd_file_acquire_dir (struct svc_rqst *rqstp , struct svc_fh
*fhp , struct nfsd_file **pnf );
π ARGUMENTS π
rqstpβ the RPC transaction being executed, aka the whole reason we're here rn β¨fhpβ the NFS filehandle of the file to be opened π₯pnfβ OUT: the new or found"struct nfsd_file"object, she's giving output param energy π
π DESCRIPTION π
So the nfsd_file_object that this API hands back is reference-counted but not garbage-collected β ngl that distinction is kinda the whole vibe check here. The object gets unhashed after the final nfsd_file_put.
Also important: this opens directories only, and only in O_RDONLY mode. no cap, that's the entire range of what she does π
Return values: nfs_ok β and in that case pnf points to an nfsd_file with its reference count boosted π
On error, an nfsstat value in network byte order is returned. periodt.
π SEE ALSO π
Kernel file ./fs/nfsd/filecache.c and all her besties:
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_local(9)nfsd_file_acquire_opened(9)nfsd_fsnotify_recalc_mask(9)
bestie bestie bestie, quick recap before you go: directories only,O_RDONLYonly, reference-counted but not garbage-collected, unhashed after the finalnfsd_file_putπ§ and on error you get annfsstatin network byte order. mwah π
that's the whole page, and honestly? she ate. source: ./fs/nfsd πΈ dated October 2026 π β nfsd_file_acquire_dir(9), signing off ππ¦β¨
π¦ 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