simple_xattr_set_limited(9)
πΈ 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 foruser.*xattrs.nameβ the name of the xattr to set or remove.valueβ the value to store (NULLto remove).sizeβ the size ofvalue.flagsβXATTR_CREATE,XATTR_REPLACE, or0.
π 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:
may_write_xattr(9)__vfs_setxattr_noperm(9)__vfs_setxattr_locked(9)vfs_listxattr(9)__vfs_removexattr_locked(9)generic_listxattr(9)xattr_full_name(9)simple_xattr_space(9)simple_xattr_free(9)simple_xattr_free_rcu(9)simple_xattr_alloc(9)simple_xattr_get(9)simple_xattr_set(9)simple_xattr_list(9)simple_xattr_add(9)simple_xattr_add_limited(9)simple_xattrs_free(9)simple_xattr_cache_cleanup(9)
mwah π β source ./fs, version/date October 2026, page simple_xattr_set_limited(9). π«Ά
π¦ 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