vfs_rmdir(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vfs_rmdir(9) β€” Kernel API Manual ✨

okay so bestie, we're in the kernel API manual today and the star of the show is vfs_rmdir(9). like, yes, it's the Kernel API Manual page for vfs_rmdir(9). directory deletion core. main character energy fr fr πŸŽ€


🌸 NAME 🌸

vfs_rmdir β€” remove directory πŸ—‘οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

int vfs_rmdir (struct mnt_idmap *idmap , struct inode *dir , struct
dentry *dentry , struct delegated_inode *delegated_inode );

πŸ’– ARGUMENTS πŸ’–

  • idmap β€” the idmap of the mount that the inode was found from. literally the receipts of where this thing came from 🧾
  • dir β€” inode of the parent directory. the mom directory, the one holding the bag πŸ‘‘
  • dentry β€” dentry of the child directory. the little one getting removed 😭
  • delegated_inode β€” returns the parent inode, if it's delegated. that's the whole job of this one, she's an output parameter πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

Remove a directory. yep, that's the vibe. one job, done iconically. πŸ—‚οΈβœ¨

if the inode has been found through an idmapped mount, then the idmap of the vfsmount must be passed through idmap. periodt. this function will then take care (she's so responsible) to map the inode according to idmap before checking permissions. permissions first, chaos never, iykyk πŸ”₯

on non-idmapped mounts, or if permission checking is to be performed on the raw inode, simply pass nop_mnt_idmap. that's the shortcut, no cap 🫢

⭐ SEE ALSO ⭐

Kernel file ./fs/namei.c β€” the whole crew, ok, here's the group chat invite list πŸ’Œ:


and that's the page!! πŸŽ€ mwah πŸ’‹

cute little sign-off bestie: this one lives in ./fs πŸ“, it's dated October 2026, and you can find it filed under vfs_rmdir(9) if you ever need her again πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from