tracefs_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tracefs_remove(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, we're in the Kernel API Manual today and the star of the show is tracefs_remove(9). yes it's a kernel function. yes it's a void. no we're not scared. let's get into it ✨


🌸 NAME 🌸

tracefs_remove β€” this one recursively removes a directory. like, the whole tree. gone. no crumbs. πŸ’€


✨ SYNOPSIS ✨

void tracefs_remove (struct dentry *dentry );

that's it. that's the whole signature. one argument, zero return value, maximum main character energy πŸ‘‘


🫢 ARGUMENTS 🫢

  • dentry β€” a pointer to the dentry of the directory that's getting removed. that's the vibe check you gotta pass in πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: this function recursively removes a directory tree in tracefs β€” and when I say recursively I mean it takes the entire tree down with it, not just the top-level folder 🫣

and the little lore drop is that this tree was previously created with a call to another tracefs function β€” like tracefs_create_file or any of its variants. so basically: you made it with tracefs, you clean it up with tracefs. balanced. as all things should be 🌈

no cap, "recursively" is doing a lot of work in that sentence. everything under that dentry is going bye-bye. 🧚

πŸ‘€ SEE ALSO πŸ‘€

go read the source bestie, it's giving essential reading πŸ“šπŸ’…


and that's the page!! sourced from ./fs/tracefs, dated October 2026 β€” mwah, stan the kernel docs, bye bestie πŸŽ€πŸ’œπŸ¦‹

πŸ“¦ where this page comes from