path_overmounted(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… path_overmounted(9) β€” like, the kernel API manual bestie πŸŽ€

okay so this is path_overmounted from the Kernel API Manual and honestly? it's a little baddie of a function that does exactly one thing and does it slay. let's get into it ✨


🌸 NAME 🌸

path_overmounted β€” check if a path is overmounted, fr fr


⭐ SYNOPSIS ⭐

bool path_overmounted (const struct path *path );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • path β€” the path you wanna check, bestie. that's it. that's the whole argument πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the vibe: this checks if path is overmounted β€” meaning, is there literally a mount sitting on top of path->mnt with path->dentry as its mountpoint? like, is something mounted on top of this thing? πŸ”οΈ

that's the whole check. no cap. it's giving "is there a mount stacked here or not" energy and honestly we respect the focus πŸ’…


πŸ”₯ CONTEXT πŸ”₯

okay this part actually matters so listen up bestie:

  • namespace_sem must be held at least shared β€” non-negotiable, periodt βœ‹
  • you MUST NOT call this under lock_mount_hash 😭 like genuinely do not. if you're in there, you should just call __lookup_mnt and check if it returns NULL instead. that's the move. iykyk
πŸ’€ for real though, calling it under lock_mount_hash is a no. the manpage literally yells MUST NOT at you in all caps, so like… hear it.

🌈 RETURN 🌈

  • if path is overmounted β†’ true is returned πŸŽ‰
  • if not β†’ false 🫢

true/false, in and out, clean, iconic, no notes ✨


🧚 SEE ALSO 🧚

the kernel file ./fs/namespace.c and honestly the whole friend group of mount-related girlies:


and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€ this little icon lives in the kernel source at ./fs, dated October 2026, and it's filed under path_overmounted(9) in the Kernel API Manual β€” go off, king πŸ‘‘πŸ¦‹

πŸ“¦ where this page comes from