kernfs_kill_sb(9)
π
kernfs_kill_sb β the kill_sb for kernfs, bestie
Okay so real talk, this one's from the Kernel API Manual, section 9 (kernel developer interfaces, iykyk). It's short, it's sweet, and it's literally the cleanup crew of the kernfs world. Let's get into it π«Ά
β¨ NAME β¨
kernfs_kill_sb β the kill_sb for kernfs πΈ
Think of it as the "okay bestie, we're done here, pack it up" function for a kernfs superblock π
β¨ SYNOPSIS β¨
void kernfs_kill_sb (struct super_block *sb );
That's it. No return value, no drama. void energy π
β¨ ARGUMENTS β¨
sbβ thesuper_blockthat's being killed πͺ¦ (yes, "killed" is the actual technical term and honestly? iconic)
β¨ DESCRIPTION β¨
So here's the tea β: this function can be used directly for file_system_type->kill_sb. Like, you can just point that bad boy at kernfs_kill_sb and go live your life β¨
But β and this is the important part, no cap β if a kernfs user needs extra cleanup, it can implement its own kill_sb and call this function at the end. So you do your little extra tidy-up first, then hand it off to kernfs_kill_sb to finish the job. Teamwork, fr fr π€
Lowkey the whole design here is "do your own thing, then let us close out" β very main character energy but also very cooperative π
β¨ SEE ALSO β¨
Kernel file ./fs/kernfs/mount.c β go read it, it's giving source of truth π
All of these are your lil' kernfs besties, definitely worth a vibe check π¦
π the cute sign-off π
This page lives under ./fs/kernfs in the kernel tree, dated October 2026 β yes, from the future, we love a forward-thinking queen πβ¨
Anyway bestie, that's the whole page! It's a tiny one but it ate and left no crumbs π Go forth and kill those superblocks responsibly πππΈ
π¦ 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