inc_nlink(9)
β¨ inc_nlink β¨
okay so bestie, welcome to inc_nlink(9) β this is a page from the Kernel API Manual, and honestly it's a tiny little icon that does one (1) thing. let's get into it π
πΈ NAME πΈ
inc_nlink β directly increment an inode's link count. that's it. that's the whole job. she's focused, she's minimal, she's serving β¨
π¦ SYNOPSIS π¦
void inc_nlink (struct inode *inode );
like look at her. void, one pointer, no notes. main character energy fr fr π
π ARGUMENTS π
inodeβ it's an inode. that's literally the whole description. the inode you're incrementing. the one and only. π«Ά
π₯ DESCRIPTION π₯
so here's the tea β β this is a low-level filesystem helper, and its whole purpose in life is to replace any direct filesystem manipulation of i_nlink. instead of everybody out here raw-dogging i_nlink by hand (messy, chaotic, not the vibe), you call this instead. slay.
and the honest-to-god lore? currently, it is only here for parity with dec_nlink. that's right β she exists so her sibling isn't doing it alone. it's giving matching outfits. it's giving "we ride together, we decrement together." no cap ππ¦
π SEE ALSO π
okay this is the part where the page goes absolutely feral and lists what feels like every inode function in the entire kernel. buckle up bestie, we're going through all of them, and yes, all of them are in (9):
Kernel file ./fs/inode.cβ that's where this whole situation lives πinode_init_always_gfp(9)alloc_inode(9)drop_nlink(9)clear_nlink(9)set_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_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, she knows everyone. connected queen π go read them if you want the full inode cinematic universe iykyk π
π ngl the biggest takeaway is: don't touchi_nlinkdirectly, use the helper, and remember she's literally just here to mirrordec_nlink. iconic behaviour, zero notes.
and that's the whole page bestie!! this cutie comes from ./fs and the date on it is October 2026 β so yeah, she's a whole timestamped moment. go forth and increment responsibly πβ¨πΈπ¦π
π¦ 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