lookup_mnt(9)
π lookup_mnt
okay so real talk, this one lives in the Kernel API Manual and honestly? it's a little baddie with one job and she does it flawlessly. no notes. let's get into it π
β¨ NAME β¨
lookup_mnt β returns the child mount that's mounted at a given location, bestie. that's it. that's the whole vibe.
πΈ SYNOPSIS πΈ
struct vfsmount * lookup_mnt (const struct path *path );
like look at her. one argument. returns a struct vfsmount *. iconic behavior honestly π¦
π ARGUMENTS π
pathβ the location in the namespace you're curious about. the spot you're like "hmm what's mounted here" about. iykyk π
π DESCRIPTION π
so here's the tea: lookup_mnt acquires and returns a new reference to the mount sitting at the location you passed in β¨
and if like... nothing is mounted there? she returns NULL. no mount, no drama, no reference. that's the whole deal π«Ά
ok but for real, note the words acquires a new reference β that's not just flavor text, bestie, that's the actual behavior described here. don't come for me if you ignore it π
π SEE ALSO π
all the sisters and cousins in the family, no gatekeeping π
- Kernel file
./fs/namespace.c 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)attach_mnt(9)vfs_create_mount(9)path_is_mountpoint(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 page!! mwah π this little cutie comes to you from ./fs and she's dated October 2026 β write it down, remember it, put it on your vision board β lookup_mnt(9) out. slay π§ββοΈβ¨
π¦ 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