inode_init_always_gfp(9)
π inode_init_always_gfp(9) β the Kernel API Manual, but make it make sense π
okay so bestie, welcome to inode_init_always_gfp π this is from the Kernel API Manual (yes, the (9) section, we're being fancy today β¨), and it's literally the glow-up routine every inode has to go through. sit down, grab a strawberry drink π, let's get into it.
πΈ NAME πΈ
inode_init_always_gfp β the vibes-level task of performing inode structure initialisation. that's it, that's the job π«Ά
β¨ SYNOPSIS β¨
int inode_init_always_gfp (struct super_block *sb , struct inode *inode
, gfp_t gfp );
three args, one int coming back at you. no cap, that's the whole signature π
π¦ ARGUMENTS π¦
sbβ the superblock that this inode belongs to. its home base, its main character context πinodeβ the actual inode you're initialising. this is the one getting the makeover πgfpβ the allocation flags. this is what we hand over if extra allocations are needed π
π DESCRIPTION π
so these are the initialisations that have to happen on every single inode allocation, because the fields do not get initialised by slab allocation. like, slab allocation is not doing that for you, bestie, it simply isn't π. and if there are additional allocations required, gfp is what gets used β that's why it's right there in the argument list, iykyk π₯
π§ SEE ALSO π§
the whole friend group, and yes we're listing every single one because nobody gets left out π the kernel file is ./fs/inode.c, and the crew is:
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_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)
okay that's genuinely a lot of cross-references and I respect the ambition π read them, they're all relevant, that's the whole point of a SEE ALSO.
β¨ cute sign-off time β¨ this page came from the source at ./fs, and it's dated October 2026 β so yes, future energy, we're ahead of schedule π¦. that's the tea, go init some inodes, ily, bye πππ
π¦ 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