Linux kernel's 'd_genocide' function removed to align with inclusive language guidelines

A recent update to the code of the upcoming Linux 6.19 has removed an unfortunately-named function in the kernel source code. The function in question was called d_genocide() and was related to the DCACHE_GENOCIDE, which has also been stripped out of the kernel. The decision aligns with the Linux kernel"s inclusive language guidelines; however, it has been in the kernel for two years already.

The d_genocide() function was introduced in 2023 as part of dcache updates. Its role was to "kill given dentry [(directory entry)], along with all its children, all their children, etc.," that kept dentries artificially busy on certain filesystems before unmounting.

The code was originally submitted by the Linux developer Al Viro. At the time he submitted them, he defended the name choice when questioned, explaining that the action of destroying a directory tree and all of its descendants would always lead to words chosen that have "nasty associations." The code itself was only ever visible to people reading the source code; it was never displayed to end-users.

The genocide function was just removed through a code restructuring process that eliminated the need for the function. The new approach modifies the kill_litter_super() function and makes the genocide function unneeded. To be clear, the update was submitted by the original author, Al Viro.

Like many open source projects, the Linux kernel underwent a period of change about half a decade ago, where language was updated to be more inclusive, dropping language like blacklist and slave. The d_genocide() function was introduced well after this. Still, it"s not clear for what purpose, whether it was a protest at the inclusive language stance or just as Viro said: any name that was chosen for a destructive function was inherently going to be bad.

Report a problem with article
Next Article

Galaxy S26 might settle for less as Samsung looks for corners to cut

Previous Article

SSMS 22.1 now out, destructive database commands powered by AI coming soon