aafs_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to aafs_create(9) from the Kernel API Manual β€” this is the apparmorfs dentry-creation girlie and she's lowkey iconic βœ¨πŸ’…

🌸 NAME 🌸

aafs_create β€” create a dentry in the apparmorfs filesystem πŸŽ€

✨ SYNOPSIS ✨

struct dentry * aafs_create (const char *name , umode_t mode , struct
dentry *parent , struct aa_common_ref *data , void *link , const struct
file_operations *fops , const struct inode_operations *iops );

πŸŽ€ ARGUMENTS πŸŽ€

  • name β€” name of the dentry to create 🏷️
  • mode β€” permissions the file should have πŸ”
  • parent β€” parent directory for this dentry πŸ“
  • data β€” data to store on inode.i_private, available in open πŸ‘€
  • link β€” if symlink, the symlink target string πŸ”—
  • fops β€” the struct file_operations that should be used for β€” yes, the original line literally stops there 😭
  • iops β€” struct of inode_operations that should be used 🧠

πŸ’– DESCRIPTION πŸ’–

So this is the basic β€œcreate a xxx” function for apparmorfs β€” main character energy for making stuff in there πŸ‘‘βœ¨

If it succeeds, it returns a pointer to a dentry, and that pointer must be freed with aafs_remove 🧹. On failure, it returns ERR_PTR πŸ’€.

bestie, don't sleep on the cleanup: success means aafs_remove later, failure means ERR_PTR. periodt 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./security/apparmor/apparmorfs.c πŸ“‚

later bestie β€” this page is from ./security/apparmor, dated October 2026, and it's the aafs_create(9) manual moment 🫢✨

πŸ“¦ where this page comes from