evict_inodes(9)
π evict_inodes β the manual page, but make it cute
okay so this is evict_inodes(9), a page from the Kernel API Manual, and bestie, it's a short one but it's a load-bearing one. sit down, sip ur strawberry milk π, let's go.
β¨ NAME β¨
evict_inodes β evict all evictable inodes for a superblock πβ¨
β¨ SYNOPSIS β¨
void evict_inodes (struct super_block *sb );
that's it. that's the whole signature. void in, void out, no vibes returned π«Ά
β¨ ARGUMENTS β¨
sbβ the superblock we're operating on π like, this is the subject of the whole operation, the main character of this function call tbh π
β¨ DESCRIPTION β¨
okay so the whole point: this function makes sure that no inodes with zero refcount are retained. literally none. zero-refcount inodes do not get to stay. they get evicted, periodt π
and here's the crucial lore π₯ β this gets called by superblock shutdown, after the SB_ACTIVE flag has been removed. so the timeline is: SB_ACTIVE gone β evict_inodes runs. and because of that, any inode that hits zero refcount during or after that call gets immediately evicted. no waiting around, no "let me think about it", no little inode limbo era. immediate. iconic behaviour honestly π
ngl this is a "you don't call this, the shutdown path calls this" kind of situation β respect the order of operations bestie, the SB_ACTIVE removal has to come first π
β¨ SEE ALSO β¨
bestie there are like forty-six of these, buckle up π¦ β all from the kernel file ./fs/inode.c:
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),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)
that's the whole squad. read them. love them. they're all in ./fs/inode.c π§
anyway that's the page!! this one came out of ./fs, dated October 2026, per the Kernel API Manual β so like, source: ./fs, version: October 2026 edition, mwah π go evict those inodes bestie, zero refcounts only, no cap ππ
π¦ 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