kernfs_unlink_sibling(9)
β¨ kernfs_unlink_sibling(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's about kernfs_unlink_sibling(9) and it's honestly a whole little vibe. buckle up π
πΈ NAME πΈ
kernfs_unlink_sibling β unlink a kernfs_node from the sibling rbtree. that's it, that's the job π
π¦ SYNOPSIS π¦
bool kernfs_unlink_sibling (struct kernfs_node *kn );
literally one function, one arg, returning a bool. clean. minimal. main character energy β¨
π ARGUMENTS π
knβ thekernfs_nodeof interest π like, this is the node we're talking about, the one we're trying to unlink.
π DESCRIPTION π
so the whole point: this function tries to unlink kn from its sibling rbtree β and that rbtree starts from kn->parent->dir.children. yep, that exact path, no cap. π
Locking: the kernfs_rwsem must be held exclusive. fr fr, don't skip this, it's not a suggestion π
π RETURN π
- returns
trueifknwas actually removed β slay, it worked π - returns
falseifknwasn't on the rbtree β no harm done, it just wasn't there π
π₯ SEE ALSO π₯
kernel file ./fs/kernfs/dir.c β and here's the whole friend group, all of them, every single one π«Ά
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_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)kernfs_rename_ns(9)
bestie reminder: hold that kernfs_rwsem exclusive or the vibe check will not pass π
and that's the whole page!! sourced from ./fs/kernfs, dated October 2026, filed under kernfs_unlink_sibling(9) β mwah, love u, go unlink 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