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
799 * The get and set xattr handler operations are called with the remainder of
804 * Note: the list xattr handler operation when called from the vfs is passed a
818 * Allocate new xattr and copy in the value; but leave the name to callers.
840 * xattr GET operation for in-memory/pseudo filesystems
845 struct simple_xattr *xattr;
849 list_for_each_entry(xattr, &xattrs->head, list) {
850 if (strcmp(name, xattr->name))
853 ret = xattr->size;
855 if (size < xattr->size)
858 memcpy(buffer, xattr->value, xattr->size);
869 struct simple_xattr *xattr;
887 list_for_each_entry(xattr, &xattrs->head, list) {
888 if (!strcmp(name, xattr->name)) {
890 xattr = new_xattr;
893 list_replace(&xattr->list, &new_xattr->list);
895 list_del(&xattr->list);
901 xattr = new_xattr;
905 xattr = NULL;
909 if (xattr) {
910 kfree(xattr->name);
911 kfree(xattr);
918 * simple_xattr_set - xattr SET operation for in-memory/pseudo filesystems
921 * @value: value of the new xattr. If %NULL, will remove the attribute
922 * @size: size of the new xattr
925 * %XATTR_CREATE is set, the xattr shouldn't exist already; otherwise fails
926 * with -EEXIST. If %XATTR_REPLACE is set, the xattr should exist;
940 * xattr REMOVE operation for in-memory/pseudo filesystems
953 * xattr LIST operation for in-memory/pseudo filesystems
959 struct simple_xattr *xattr;
963 list_for_each_entry(xattr, &xattrs->head, list) {
967 if (!trusted && xattr_is_trusted(xattr->name))
970 len = strlen(xattr->name) + 1;
977 memcpy(buffer, xattr->name, len);