lc_is_used(9)
πΈ 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β thelru_cacheobject. 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:
lc_create(9)lc_destroy(9)lc_reset(9)lc_seq_printf_stats(9)lc_find(9)lc_del(9)lc_get(9)lc_get_cumulative(9)lc_try_get(9)lc_committed(9)lc_put(9)lc_element_by_index(9)lc_seq_dump_details(9)
Source/version + date vibes: ./lib Β· October 2026 Β· lc_is_used(9) β xoxo, the kernel girls ππ«Άπ
π¦ 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