kernfs_root_from_sb(9)
π kernfs_root_from_sb(9) β like, the kernel API manual edition π
okay so bestie, welcome to section 9 of the Kernel API Manual, and today's main character is literally kernfs_root_from_sb π¦ (yes the (9) is part of the name, it's giving "I have a section number and I'm proud of it").
β¨ NAME β¨
kernfs_root_from_sb β determine the kernfs_root associated with a super_block πΈ
like it just... finds the root for you. no cap, that's the whole gig π«Ά
π SYNOPSIS π
struct kernfs_root * kernfs_root_from_sb (struct super_block *sb );
that's it. one function, one arg, returns a pointer to a struct kernfs_root. iconic behavior honestly π
π ARGUMENTS π
sbβ thesuper_blockin question π like, the one you're curious about. the subject of the vibe check, if you will.
β RETURN β
it hands you back the kernfs_root associated with sb π β that's the whole point, that's the slay.
β οΈ but listen: ifsbis not a kernfs one,NULLis returned. so fr fr, check that pointer before you dereference it, bestie ππ
π₯ SEE ALSO π₯
Kernel file ./fs/kernfs/mount.c β and honestly the whole squad:
go read them, iykyk πβ¨
π§ sign-off π§
this page lives in ./fs/kernfs, and it's dated October 2026 π so yeah, that's the source, that's the version, that's the date β go forth and find those roots, bestie. periodt. ππ
π¦ 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