unlock_new_inode(9)
π unlock_new_inode(9) β the Kernel API Manual, bestie edition
okay so real talk, this one lives in the Kernel API Manual and it's genuinely one of those tiny functions that's doing so much emotional labor for the whole filesystem. let's get into it π
β¨ NAME β¨
unlock_new_inode β clears the I_NEW state and wakes up literally anyone waiting on it π«Ά
β¨ SYNOPSIS β¨
void unlock_new_inode (struct inode *inode );
β¨ ARGUMENTS β¨
inodeβ the new inode you're unlocking. that's her. the fresh one. π
β¨ DESCRIPTION β¨
so here's the vibe: you call this when inode is fully initialised. like, fully fully. done. no notes. and then this function does two things, no cap:
- clears the new state of the inode (bye
I_NEWπ), and - wakes up everyone who's been waiting for that inode to finish initialising π
it's giving "the group chat can finally stop refreshing." main character energy for a function that returns void. periodt. π
ngl there is no return value here. she simply does the task and leaves. iconic.
β¨ SEE ALSO β¨
okay so the cross-references are honestly a whole friend group, and the kernel file holding all this lore is ./fs/inode.c β go read it iykyk πβ¨
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)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_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)
and that's the whole page bestie, no crumbs left πΈ this edition came from the ./fs source, dated October 2026, and it's filed under unlock_new_inode(9). go wake up your waiters. 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