configfs_remove_dir(9)
π
configfs_remove_dir β the configfs_remove_dir(9) glow-up
ok so real talk, this one lives in the Kernel API Manual and it's genuinely such a little workhorse, bestie. Let's get into it π
β¨ NAME β¨
configfs_remove_dir β literally just: it removes a config_item's directory. That's the whole vibe. π
π¦ SYNOPSIS π¦
void configfs_remove_dir (struct dentry *d );
no cap, that's the entire signature. one (1) parameter, zero return value, it's giving "quietly does the job and leaves" π
πΈ ARGUMENTS πΈ
dβ the dentry we're removing. that's it, that's the girl. she's the directory getting yeeted π
π DESCRIPTION π
okay so the thing that makes this one a little special is the order of operations β we remove any files in the directory before we remove the directory itself. files first, directory second, always. β¨
and lowkey there's some archaeology here: what used to be configfs_rmdir has been inlined below instead of being called separately. so like, it's all one function now β no extra little function call hopping around, she's self-contained π
π«Ά heads up, fr fr: the caller holds the mutex of the item's inode. that's your job, not hers. don't come for this function without the mutex locked, iykyk π₯
π§ SEE ALSO π§
- Kernel file
./fs/configfs/dir.cβ that's where the magic happens, go read it π configfs_create_dir(9)β the making-her oneconfigfs_register_group(9)configfs_unregister_group(9)configfs_register_default_group(9)configfs_unregister_default_group(9)
all the configfs besties, all in one group chat π
π sign-off π
this icon was brought to you by ./fs/configfs, dated October 2026, and she's featured in the Kernel API Manual. stay hydrated, lock your mutexes, and remember: files before directories, always ππ
β¨π¦
π¦ 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