Lines Matching refs:xattr
2 File: fs/xattr.c
13 #include <linux/xattr.h>
81 * @name - xattr name to set
678 * In order to implement different sets of xattr operations for each xattr
679 * prefix with the generic xattr API, a filesystem should create a
683 * The generic_fooxattr() functions will use this list to dispatch xattr
795 * Allocate new xattr and copy in the value; but leave the name to callers.
817 * xattr GET operation for in-memory/pseudo filesystems
822 struct simple_xattr *xattr;
826 list_for_each_entry(xattr, &xattrs->head, list) {
827 if (strcmp(name, xattr->name))
830 ret = xattr->size;
832 if (size < xattr->size)
835 memcpy(buffer, xattr->value, xattr->size);
846 struct simple_xattr *xattr;
864 list_for_each_entry(xattr, &xattrs->head, list) {
865 if (!strcmp(name, xattr->name)) {
867 xattr = new_xattr;
870 list_replace(&xattr->list, &new_xattr->list);
872 list_del(&xattr->list);
878 xattr = new_xattr;
882 xattr = NULL;
886 if (xattr) {
887 kfree(xattr->name);
888 kfree(xattr);
895 * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems
898 * @value: value of the new xattr. If %NULL, will remove the attribute
899 * @size: size of the new xattr
902 * %XATTR_CREATE is set, the xattr shouldn't exist already; otherwise fails
903 * with -EEXIST. If %XATTR_REPLACE is set, the xattr should exist;
917 * xattr REMOVE operation for in-memory/pseudo filesystems
930 * xattr LIST operation for in-memory/pseudo filesystems
936 struct simple_xattr *xattr;
940 list_for_each_entry(xattr, &xattrs->head, list) {
944 if (!trusted && xattr_is_trusted(xattr->name))
947 len = strlen(xattr->name) + 1;
954 memcpy(buffer, xattr->name, len);