new_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨ β€” new_inode(9), obtain an inode

okay so welcome to the Kernel API Manual, bestie πŸ’–. this page is literally about new_inode β€” the function that obtains an inode. yes, that's the whole vibe. no cap. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

struct inode * new_inode (struct super_block *sb );

πŸ’… ARGUMENTS πŸ’…

  • sb β€” superblock. that's the one and only argument, bestie 🫢.

πŸ”₯ DESCRIPTION πŸ”₯

okay so new_inode allocates a new inode for the given superblock. slay. ✨

the default gfp_mask for allocations related to inode->i_mapping is GFP_HIGHUSER_MOVABLE. that's the default, periodt. πŸ’…

🚨 caveat time, bestie: if HIGHMEM pages are unsuitable, or it is known that pages allocated for the page cache are not reclaimable or migratable, then mapping_set_gfp_mask must be called with suitable flags on the newly created inode's mapping. this is not a drill 😭.

πŸŽ€ SEE ALSO πŸŽ€

the kernel file is literally ./fs/inode.c β€” and here's the whole function fam, no skips:


xoxo, your kernel bestie πŸ’– β€” source/version: ./fs; date: October 2026; page: new_inode(9). bye bestie! 🫢

πŸ“¦ where this page comes from