simple_xattr_set_limited(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the Kernel API Manual page for simple_xattr_set_limited(9) β€” the function that sets an xattr with per-inode user.* limits. Yes, that's literally the whole vibe. ✨

✨ SYNOPSIS ✨

int simple_xattr_set_limited (struct simple_xattr_cache *cache , struct
       list_head *xattrs , struct simple_xattr_limits *limits , const char
       *name , const void *value , size_t size , int flags );

that's the whole call, no cap. πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • cache β€” anchor for the hash table. lowkey foundational.
  • xattrs β€” the header of the xattr object.
  • limits β€” per-inode limit counters for user.* xattrs.
  • name β€” the name of the xattr to set or remove.
  • value β€” the value to store (NULL to remove).
  • size β€” the size of value.
  • flags β€” XATTR_CREATE, XATTR_REPLACE, or 0.

πŸ’… DESCRIPTION πŸ’…

Think of it like simple_xattr_set, but with extra boundaries specifically for user.* xattrs: it enforces per-inode count limits and total value size limits. Under the hood it uses speculative pre-increment of the atomic counters so races don't get a chance to be messy β€” and it does this without requiring external locks. periodt. πŸ”₯

πŸ”₯ RETURN πŸ”₯

On success, zero is returned. On failure, a negative error code is returned. iconic when it works, clear when it doesn't. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/xattr.c plus these API besties:


mwah πŸ’‹ β€” source ./fs, version/date October 2026, page simple_xattr_set_limited(9). 🫢

πŸ“¦ where this page comes from