kernfs_rename_ns(9)
π kernfs_rename_ns(9)
okay so welcome to the Kernel API Manual bestie, today we're reading the kernfs_rename_ns(9) page and honestly? she's short, she's sweet, she moves nodes and renames them in one go. main character energy fr fr πΈ
β¨ NAME β¨
kernfs_rename_ns β move and rename a kernfs_node π¦
yes. both. one function. she does it all π
β¨ SYNOPSIS β¨
int kernfs_rename_ns (struct kernfs_node *kn , struct kernfs_node *new_parent , const char *new_name , const struct ns_common *new_ns );
β¨ ARGUMENTS β¨
knβ the target node π like, the node we're actually doing stuff tonew_parentβ the new parent to putsdunder π«Ά (yes, the page sayssd, we don't question the lore, we just pass it along)new_nameβ the new name, literally just the name she's getting πnew_nsβ the new namespace tag π·οΈ
β¨ RETURN β¨
0 on success, -errno on failure. that's the whole vibe check β zero means slay, negative errno means something went off π
β¨ SEE ALSO β¨
Kernel file ./fs/kernfs/dir.c β that's where the source lives, go say hi π«Ά
and then the entire friend group, no cap, all of these:
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_walk_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)
that's the whole group chat, mwah π
ngl the entire page is like four sections long β short queen behavior, we respect it π
okay that's the tea, bestie π this one came out of ./fs/kernfs, dated October 2026, and the page is literally called kernfs_rename_ns(9) β iykyk. go forth and rename 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