aafs_create(9)
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 oninode.i_private, available in open πlinkβ if symlink, the symlink target string πfopsβ thestruct file_operationsthat should be used for β yes, the original line literally stops there πiopsβstructofinode_operationsthat 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 meansaafs_removelater, failure meansERR_PTR. periodt π«Ά
π¦ SEE ALSO π¦
Kernel file: ./security/apparmor/apparmorfs.c π
mangle_name(9)__aafs_setup_d_inode(9)aafs_create_file(9)aafs_create_dir(9)aafs_remove(9)aa_simple_write_to_buffer(9)aa_get_data_from_compressed(9)query_data(9)query_label(9)aa_write_access(9)__next_ns(9)__first_profile(9)__next_profile(9)next_profile(9)p_start(9)p_next(9)p_stop(9)seq_show_profile(9)entry_create_file(9)entry_create_dir(9)entry_remove_file(9)entry_remove_dir(9)aa_destroy_aafs(9)aa_create_aafs(9)
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
- 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