lc_is_used(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

lc_is_used β€” find element by label. Yeah bestie, this is the lc_is_used(9) page from the Kernel API Manual, and we're gonna vibe through it together 🫢✨


✨ SYNOPSIS ✨

bool lc_is_used (struct lru_cache *lc , unsigned int enr );

πŸŽ€ ARGUMENTS πŸŽ€

  • lc β€” the lru_cache object. She's the main character of this function πŸ’…
  • enr β€” element number. The little label/number you're checking for πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

Okay so this one returns true if the element with the requested "label" or element number is present in the hash table, and it's used (refcnt > 0). Slay βœ…

It also finds elements that are not _currently_ used but only "about to be used" β€” i.e. on the "to_be_changed" list, pending transaction commit. So not just the currently-used girlies, but the pending-transaction girlies too πŸ‘€πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./lib/lru_cache.c is the source, and here's the whole squad:


Source/version + date vibes: ./lib Β· October 2026 Β· lc_is_used(9) β€” xoxo, the kernel girls πŸ’–πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from