vfs_fileattr_set(9)
π NAME
vfs_fileattr_set(9) β change miscellaneous file attributes. bestie, this is the kernel helper that handles those extra lil file attrs for you β¨
π¦ SYNOPSIS
int vfs_fileattr_set (struct mnt_idmap *idmap , struct dentry *dentry ,
struct file_kattr *fa );
πΈ ARGUMENTS
idmapβ idmap of the mount π«Άdentryβ the object to change πfaβ fileattr pointer, aka your attrs payload π
π₯ DESCRIPTION
okay so here's the vibe: after it verifies permissions, it calls the i_op->fileattr_set callback, if it exists. periodt.
Verifying the attributes means it grabs the current attributes with i_op->fileattr_get. that also lets it initialize attributes that the caller hasn't set to their current values. the inode lock is held thoughout (their spelling, not mine π) to prevent racing with another instance. no cap.
β RETURN
0 on success π, or a negative error on failure π.
π SEE ALSO
Kernel file ./fs/file_attr.c β the whole crew:
okay bye bestie π source vibes: ./fs; date: October 2026. mwah π
π¦ 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