vfs_fileattr_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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