kern_path_parent(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to kern_path_parent(9) β€” yes, that's the Kernel API Manual page, and it's literally about looking up a path and getting both the parent and the target back. πŸŽ€


✨ SYNOPSIS ✨

struct dentry * kern_path_parent (const char *name , struct path *path
);

🫢 ARGUMENTS 🫢

  • name β€” the path name. Slay, that's it. πŸ’…
  • path β€” where the parent gets stored. 🩷

🌸 DESCRIPTION 🌸

So the path name has to end with a normal component β€” not ".", not "..", and not "/". No cap, that's the rule. 🚨

A lookup happens, and if it succeeds, the parent info is stored in parent and the dentry is returned. 🌈

The dentry can be negative, but the parent will be positive. That's the vibe check. πŸ’–


πŸ”₯ RETURN πŸ”₯

It returns the dentry or an error. Simple as that. ✨


πŸ’œ SEE ALSO πŸ’œ

This includes the kernel file ./fs/namei.c, plus all these cross-refs, fr fr:


xoxo, source ./fs, date October 2026, manual kern_path_parent(9) πŸ’–πŸ¦‹

πŸ“¦ where this page comes from