fh_verify(9)
π fh_verify(9) β like, the Kernel API Manual's main character β¨
okay bestie, welcome to the <pink>Kernel API Manual</pink> entry for fh_verify(9) β the filehandle lookup + access-checking queen π. she's lowkey everywhere in nfsd and honestly? she ate. let's get into it π
β¨ NAME β¨
fh_verify β filehandle lookup and access checking, fr fr π¦
πΈ SYNOPSIS πΈ
__be32 fh_verify (struct svc_rqst *rqstp , struct svc_fh *fhp , umode_t
type , int access );
like, yes, that's the whole signature, no cap π
π ARGUMENTS π
rqstpβ pointer to the current rpc request π«Ά that's the vibe context.fhpβ the filehandle to be verified π the thing we're checking, periodt.typeβ the expected type of the object thatfilehandlepoints to πaccessβ the type of access needed to that object, iykyk π
π DESCRIPTION π
so what she does is: look up a dentry from the on-the-wire filehandle, check the client's access to the export, and set the current task's credentials. all three, one function, main character energy π
β οΈ okay important bestie: regardless of success or failure offh_verify,fh_putshould be called onfhpwhen the caller is finished with the filehandle. success, fail, whatever β you still callfh_put. no skipping π
fh_verify may be called multiple times on a given filehandle β for example, when processing an NFSv4 compound π§ the first call will look up a dentry using the on-the-wire filehandle. subsequent calls will skip the lookup and just perform the other checks and possibly change the current task's credentials. so she's efficient, she remembers, she doesn't redo the lookup. obsessed β¨
type specifies the type of object expected, using one of the S_IF* constants defined in include/linux/stat.h π the caller may use zero to indicate that it doesn't care (mood, honestly), or a negative integer to indicate that it expects something not of the given type π like, "literally anything but that, please."
access is formed from the NFSD_MAY_* constants defined in fs/nfsd/vfs.h β that's where the permission vibes come from.
π¦ SEE ALSO π¦
- Kernel file
./fs/nfsd/nfsfh.c__fh_verify(9)π fh_verify_local(9)πΈfh_getattr(9)βfh_fill_pre_attrs(9)πfh_fill_post_attrs(9)πfh_fill_both_attrs(9)π«Άnfsd4_change_attribute(9)π₯
go read those too, bestie, they're all in the same friend group π
and that's the page!! sourced from <purple>./fs/nfsd</purple>, dated <cyan>October 2026</cyan>, and it's the fh_verify(9) entry β mwah, stan her, bye ππ
π¦ 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