find_inode_rcu(9)
π find_inode_rcu(9) β Kernel API Manual π
hey bestie π«Ά welcome to the Kernel API Manual page for find_inode_rcu(9). this is the inode-cache search function, and yes, itβs giving βfind the matching inode and donβt do anything cursedβ energy. letβs go. β¨
β¨ NAME β¨
find_inode_rcu β find an inode in the inode cache. thatβs it, thatβs the assignment, and it ate. π
πΈ SYNOPSIS πΈ
struct inode * find_inode_rcu (struct super_block *sb , u64 hashval ,
int (*test)(struct inode *, void *) , void *data );
π ARGUMENTS π
okay so hereβs whoβs who in this functionβs group chat:
sbβ Super block of file system to search. itβs the super block of the file system youβre searching, bestie. π¦hashvalβ Key to hash. the hash key for the search. πtestβ Function to test match on an inode. this is the matchmaker. πdataβ Data for test function. the lil extra data that gets handed totest. π
π DESCRIPTION π
Search for the inode specified by hashval and data in the inode cache, where the helper function test will return 0 if the inode does not match and 1 if it does. so test is basically doing the vibe check: 0 = nope, 1 = yes bestie. π
the test function must be responsible for taking the i_lock spin_lock and checking i_state for an inode being freed or being initialized. that responsibility is literally on test, no cap. π«Ά
If successful, this will return the inode for which the test function returned 1 and NULL otherwise. no extra little treats, just the matching inode or NULL. β¨
The test function is not permitted to take a ref on any inode presented. It is also not permitted to sleep. and the caller must hold the RCU read lock. this is highkey not optional, bestie. π¨
π SEE ALSO π
Kernel file ./fs/inode.c β plus the whole friend group:
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),ilookup(9),find_inode_nowait(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)
made with π by ./fs, October 2026 β find_inode_rcu(9), out. mwah π
π¦ 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