ilookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« ilookup(9) β€” the Kernel API Manual, bestie edition πŸ’«

okay so we're in the Kernel API Manual today and the main character is ilookup(9) β€” she's the one you call when you've got an inode number and you need to know if the inode cache is holding her. no cap, this is a short one. slay. πŸŽ€


🌸 SYNOPSIS 🌸

struct inode * ilookup (struct super_block *sb , u64 ino );

that's the whole vibe check right there. she takes two things and hands you back a struct inode *. πŸ’…


✨ ARGUMENTS ✨

  • sb β€” the super block of the file system you wanna search πŸ¦‹ literally just which filesystem's cache we're digging in.
  • ino β€” the inode number you're looking for. the thing itself. the u64. πŸ”₯

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜• β€” ilookup goes and searches for the inode ino in the inode cache.

and if the inode is in the cache? the inode gets returned to you with an incremented reference count. πŸ”₯ that part is not optional, she's handing you a ref and you're gonna be responsible for it, iykyk. the way that reference count goes up the second you get her back, obsessed.

🫢 reminder bestie: you get an inode back = you got a ref. that's just what the page says and i'm not about to make stuff up on main. πŸ’€

πŸŽ€ SEE ALSO πŸŽ€

the kernel file ./fs/inode.c, and honestly the entire inode-cache extended friend group β€” like this page has a whole entourage, periodt:

inode_init_always_gfp(9), alloc_inode(9), drop_nlink(9), clear_nlink(9), set_nlink(9), inc_nlink(9), inode_sb_list_add(9), __insert_inode_hash(9), __remove_inode_hash(9), evict_inodes(9), new_inode(9), unlock_new_inode(9), lock_two_nondirectories(9), unlock_two_nondirectories(9), inode_insert5(9), iget5_locked(9), iget5_locked_rcu(9), iget_locked(9), iunique(9), ihold(9), ilookup5_nowait(9), ilookup5(9), find_inode_nowait(9), find_inode_rcu(9), find_inode_by_ino_rcu(9), iput(9), iput_not_last(9), bmap(9), inode_update_time(9), generic_update_time(9), atime_needs_update(9), file_remove_privs(9), current_time(9), file_update_time(9), file_modified_flags(9), file_modified(9), kiocb_modified(9), inode_init_owner(9), inode_owner_or_capable(9), inode_dio_wait(9), timestamp_truncate(9), inode_set_ctime_current(9), inode_set_ctime_deleg(9), in_group_or_capable(9), mode_strip_sgid(9), dump_inode(9)

like… name a better-connected page, i'll wait. πŸ‘‘


mwah πŸ’‹ this cutie lives under the ./fs source, version/date stamp is October 2026, and she's filed as ilookup(9) β€” go read her siblings, ily, bye πŸ§šπŸ’œ

πŸ“¦ where this page comes from