While the Linux kernel has inclusive terminology guidelines for the past five years to replace phrases like master/slave and blacklist/whitelist, there has surprisingly been a “genocide” function within the kernel that was questioned when it was first submitted for inclusion but now removed in Linux 6.19.
Introduced to the Linux kernel back in 2023 was the d_genocide() function as part of various dcache updates to the kernel. The genocide name was questioned when the patches were first posted by longtime Linux developer Al Viro. His response at the time was:
“kill_them_all(), on the account of that being what it’s doing?
I can explain the problems with each of your suggested identifiers, if you really wish that, but I would [strongly] suggest taking that off-list.
As for the bad words… google “jesux” someday. Yes, we do have identifiers like “kill”, “abort”, etc. and those are really not going anywhere; live with it.”
And further adding:
“To elaborate a bit: what that function does (well, tries to do – it has serious limitations, which is why there is only one caller remaining and that one is used only when nothing else can access the filesystem anymore) is “kill given dentry, along with all its children, all their children, etc.”
I sincerely doubt that you will be able to come up with _any_ word describing such action in any real-world context that would not come with very nasty associations.
Context: a bunch of filesystems have directory tree entirely in dcache; creating a file or directory bumps the reference count of dentry in question, so instead of going back to 0 after e.g. mkdir(2) returns it is left with refcount 1, which prevents its eviction. In effect, all positive dentries in there are artificially kept busy. On rmdir(2) or unlink(2) that extra reference is dropped and they get evicted.”
Fast forward two years, now with this merge to the Linux 6.19 kernel the “d_genocide()” and “DCACHE_GENOCIDE” related code is no more.
The genocide code was called from the kill_litter_super() function and Al Viro explained in the pull request:
“instead of having kill_litter_super() mess with removing the remaining “leaked” references (e.g. for all tmpfs files that hadn’t been removed prior to umount), have the regular shrink_dcache_for_umount() strip DCACHE_PERSISTENT of all dentries, dropping the corresponding reference if it had been set. After that kill_litter_super() becomes an equivalent of kill_anon_super().”
The “genocide” term was only ever used as a function name and not displayed to end-users, but in any event with Linux 6.19 has now been removed as part of this code restructuring.
