path_is_mountpoint(9)
π¦ path_is_mountpoint(9) β the Kernel API Manual, bestie edition π¦
okay so real talk, this one lives in the <pink>Kernel API Manual</pink> and it is so much more chill than it sounds, i promise π
β¨ NAME β¨
path_is_mountpoint β checks if a path is a mount in the current namespace. that's it. that's the whole vibe check π₯
πΈ SYNOPSIS πΈ
bool path_is_mountpoint (const struct path *path );
π ARGUMENTS π
pathβ the path to check. like, the actual thing u want the answer about π
π DESCRIPTION π
okay so here's the tea, bestie β d_mountpoint can only be used reliably to establish if a dentry is not mounted in any namespace β and that common case is handled inline. iconic, efficient, we love that for it π«Ά
but d_mountpoint isn't aware of the possibility there may be multiple mounts using a given dentry in a different namespace. yeah. it doesn't know. it's living its truth and that truth is incomplete π
so this function checks if the passed-in path is a mountpoint rather than the dentry alone. literally the whole point. main character energy β¨
π SEE ALSO π
Kernel file ./fs/namespace.c and the whole squad:
mnt_get_write_access(9)mnt_want_write(9)mnt_get_write_access_file(9)mnt_want_write_file(9)mnt_put_write_access(9)mnt_drop_write(9)mnt_hold_writers(9)mnt_unhold_writers(9)__lookup_mnt(9)lookup_mnt(9)attach_mnt(9)vfs_create_mount(9)may_umount_tree(9)may_umount(9)clone_private_mount(9)attach_recursive_mnt(9)do_lock_mount(9)path_overmounted(9)can_move_mount_beneath(9)mnt_set_expiry(9)mnt_allow_writers(9)
and that's the whole page, no cap π§ this cutie came straight out of ./fs and it's dated October 2026 β go forth and check ur mountpoints, bestie π
π
π¦ 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