__move_to_shrink_list(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to the __move_to_shrink_list(9) page from the Kernel API Manual πŸ’–. The whole assignment? try to place a dentry into a shrink list. That's it. Iconic.

✨ SYNOPSIS ✨

bool __move_to_shrink_list (struct dentry *dentry , struct list_head *list );

πŸŽ€ ARGUMENTS πŸŽ€

  • dentry β€” the dentry you're trying to put into the shrink list. main character energy fr fr.
  • list β€” the list you're putting dentry into. the destination. πŸ’…

⭐ RETURN ⭐

Returns true if dentry had been placed into list, and false otherwise. So: true = it made it in; false = no entry, no drama. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: if dentry is idle and is not already included in a shrink list, __move_to_shrink_list moves it into list and returns true. Otherwise it does nothing and returns false. Periodt. ✨

⚠️ Caller rules, and they are not optional: the caller must be holding dentry->d_lock. There must have been no calls of dentry_free(dentry) prior to the beginning of the RCU read-side critical area in which __move_to_shrink_list(dentry, list) is called. Like, do not skip this, iykyk 😭.

Also, list should be thread-private and eventually emptied by passing it to shrink_dentry_list. Don't just leave it there like an unread group chat, bestie 🫢.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./fs/dcache.c: d_drop(9), dentry_kill(9), d_find_any_alias(9), d_find_alias(9), prune_dcache_sb(9), shrink_dcache_sb(9), enum d_walk_ret(9), d_walk(9), path_has_submounts(9), shrink_dcache_tree(9), d_invalidate(9), __d_alloc(9), d_alloc(9), d_alloc_pseudo(9), d_instantiate(9), d_obtain_alias(9), d_obtain_root(9), d_add_ci(9), d_same_name(9), __d_lookup_rcu(9), d_lookup(9), __d_lookup(9), d_hash_and_lookup(9), d_delete(9), d_rehash(9), d_add(9), d_ancestor(9), d_splice_alias(9), is_subdir(9).


cute little sign-off ✨ source/version: ./fs; date: October 2026. That's the __move_to_shrink_list(9) moment, mwah πŸ’‹πŸŽ€.

πŸ“¦ where this page comes from