generic_ci_..._strict_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… generic_ci_..._strict_name(9) β€” like, the vibe check for filenames

okay bestie, welcome to the Kernel API Manual entry for generic_ci_..._strict_name(9). yes the name is a whole mouthful, no i will not be shortening it, it's iconic in its own chaotic way. sit down, grab a strawberry drink πŸ“, and let's get into it.


✨ NAME ✨

generic_ci_validate_strict_name β€” the function that checks whether a name is even allowed to become a directory entry. it's giving bouncer at the club door fr fr 🫢


πŸŽ€ SYNOPSIS πŸŽ€

bool generic_ci_validate_strict_name (struct inode *dir , const struct qstr *name );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dir β€” the inode of the directory where the new file is gonna be created. like, the parent folder, the one holding the door open πŸ’–
  • name β€” the name of the new file. the little guy whose fate we're judging ✨

🌸 DESCRIPTION 🌸

so what does this function actually do? it checks if the proposed filename is valid for the parent directory. that's the whole job. main character energy, honestly.

what that means in practice: only valid UTF-8 filenames will be accepted for casefold directories from filesystems that were created with the strict encoding flag. so if the directory is strict about encoding, the name better be valid UTF-8 or it's not getting in 😭

but also β€” and this is the lowkey important part β€” any name will be accepted for directories that don't have casefold enabled, or that aren't being strict with the encoding. so no-cap, the strictness is conditional, it's not out here gatekeeping everything πŸ’…


πŸ‘‘ RETURN πŸ‘‘

  • True β€” the filename is suitable for this directory. and yes, it can return true even if a given name isn't suitable for a strict encoding directory, as long as the directory being used isn't strict. plot twist, i know πŸ™ˆ
  • False β€” the filename isn't suitable for this directory. this only happens when a directory is casefolded and the filesystem is strict about its encoding. the stars really gotta align for a false, ngl ⭐

🌈 SEE ALSO 🌈

Kernel file ./include/linux/fs.h plus the whole extended friend group:


okay that's the whole page, you ate that 🍽️✨ this little beauty lives over in ./include/linux and it's dated October 2026 β€” so yes, it's a future icon, we been knew πŸ’œπŸŽ€ bye bestie, go validate some names responsibly πŸ’…

πŸ“¦ where this page comes from