kernfs_walk_and_get_ns(9)
π kernfs_walk_and_get_ns(9) β the Kernel API Manual moment
okay so bestie, welcome to kernfs_walk_and_get_ns(9) from the Kernel API Manual. yes that's a whole mouthful, but she's iconic and we're gonna get through it together, i promise π«Ά
β¨ NAME β¨
kernfs_walk_and_get_ns β find and get a kernfs_node with the given path. literally that's her whole job, and she ate π
πΈ SYNOPSIS πΈ
struct kernfs_node * kernfs_walk_and_get_ns (struct kernfs_node *parent
, const char *path , const struct ns_common *ns );
like, that's the whole signature, no cap. she takes three things and gives you back a struct kernfs_node * β¨
π ARGUMENTS π
parentβ thekernfs_nodeyou're searching under. your starting point, your home base, your main character's origin story πpathβ the path you're looking for. what you're hunting for down there πnsβ the namespace tag to use. the vibe check for which namespace we're in π
π¦ DESCRIPTION π¦
so here's the tea: she looks for a kernfs_node with path path under parent, and if she finds it, she gets a reference to it. obsessed π
β οΈ important bestie: this function may sleep. do not call her from a context where sleeping is illegal, fr fr. she needs her beauty rest π΄
π RETURN π
- pointer to the found
kernfs_nodeon success β slay, you found her π NULLon failure β she's not there, it's giving nothing π
π₯ SEE ALSO π₯
Kernel file ./fs/kernfs/dir.c β and honestly the whole girl squad:
kernfs_path_from_node_locked(9)kernfs_name(9)kernfs_path_from_node(9)pr_cont_kernfs_name(9)pr_cont_kernfs_path(9)kernfs_get_parent(9)kernfs_name_hash(9)kernfs_link_sibling(9)kernfs_unlink_sibling(9)kernfs_get_active(9)kernfs_put_active(9)kernfs_drain(9)kernfs_get(9)kernfs_put(9)kernfs_node_from_dentry(9)kernfs_add_one(9)kernfs_find_ns(9)kernfs_find_and_get_ns(9)kernfs_create_root(9)kernfs_destroy_root(9)kernfs_root_to_node(9)kernfs_create_dir_ns(9)kernfs_create_empty_dir(9)kernfs_next_descendant_post(9)kernfs_activate(9)kernfs_show(9)kernfs_remove(9)kernfs_break_active_protection(9)kernfs_unbreak_active_protection(9)kernfs_remove_self(9)kernfs_remove_by_name_ns(9)kernfs_rename_ns(9)
okay that's the whole page bestie, you're officially a kernfs girlie now π
sign-off tea: this lil beauty lives in ./fs/kernfs, version vibes from October 2026, and she's filed under kernfs_walk_and_get_ns(9). 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