kernfs_kill_sb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the super_block that'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