configfs_remove_dir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🧚

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