lookup_one_unlocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lookup_one_unlocked(9)

okay so bestie, welcome to the Kernel API Manual ✨ this one's called lookup_one_unlocked, and it's literally the glow-up version of looking up a single pathname component. one (1) component. that's the whole vibe. πŸŽ€


🌸 NAME 🌸

lookup_one_unlocked β€” lookup single pathname component πŸ¦‹


✨ SYNOPSIS ✨

struct dentry * lookup_one_unlocked (struct mnt_idmap *idmap , struct
qstr *name , struct dentry *base );

🧚 ARGUMENTS 🧚

  • idmap β€” the idmap of the mount you're performing the lookup from, iykyk 🫢
  • name β€” a qstr olding pathname component to lookup (that's the component you're hunting for, bestie)
  • base β€” the base directory you're looking up from πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so this one is for in-kernel filesystem clients β€” think file servers and friends. main character energy, but make it kernel-space. πŸ”₯

the way that it differs from lookup_one is everything: you should call this one without the parent i_rwsem held, and it will take the i_rwsem itself if necessary. no cap. it handles its own locking, you just show up. πŸ’…


πŸ¦‹ RETURN πŸ¦‹

  • A dentry, possibly negative, or
  • same errors as try_lookup_noperm or
  • ERR_PTR(-ENOENT) if parent has been removed, or
  • ERR_PTR(-EACCES) if parent directory is not searchable. 😭

🌈 SEE ALSO 🌈

Kernel file ./fs/namei.c β€” and like, the entire friend group:

okay that's the whole page, you ate that πŸ’… this lil icon came from ./fs, dated October 2026, and it goes by lookup_one_unlocked(9) β€” periodt. πŸ“πŸ‘‘

πŸ“¦ where this page comes from