Lines Matching refs:handler

44 #define for_each_xattr_handler(handlers, handler)		\  argument
46 for ((handler) = *(handlers)++; \
47 (handler) != NULL; \
48 (handler) = *(handlers)++)
57 const struct xattr_handler *handler; in xattr_resolve_name() local
64 for_each_xattr_handler(handlers, handler) { in xattr_resolve_name()
67 n = strcmp_prefix(*name, xattr_prefix(handler)); in xattr_resolve_name()
69 if (!handler->prefix ^ !*n) { in xattr_resolve_name()
75 return handler; in xattr_resolve_name()
146 const struct xattr_handler *handler; in xattr_supported_namespace() local
157 for_each_xattr_handler(handlers, handler) { in xattr_supported_namespace()
158 if (!strncmp(xattr_prefix(handler), prefix, preflen)) in xattr_supported_namespace()
171 const struct xattr_handler *handler; in __vfs_setxattr() local
173 handler = xattr_resolve_name(inode, &name); in __vfs_setxattr()
174 if (IS_ERR(handler)) in __vfs_setxattr()
175 return PTR_ERR(handler); in __vfs_setxattr()
176 if (!handler->set) in __vfs_setxattr()
180 return handler->set(handler, mnt_userns, dentry, inode, name, value, in __vfs_setxattr()
358 const struct xattr_handler *handler; in vfs_getxattr_alloc() local
367 handler = xattr_resolve_name(inode, &name); in vfs_getxattr_alloc()
368 if (IS_ERR(handler)) in vfs_getxattr_alloc()
369 return PTR_ERR(handler); in vfs_getxattr_alloc()
370 if (!handler->get) in vfs_getxattr_alloc()
372 error = handler->get(handler, dentry, inode, name, NULL, 0); in vfs_getxattr_alloc()
383 error = handler->get(handler, dentry, inode, name, value, error); in vfs_getxattr_alloc()
392 const struct xattr_handler *handler; in __vfs_getxattr() local
394 handler = xattr_resolve_name(inode, &name); in __vfs_getxattr()
395 if (IS_ERR(handler)) in __vfs_getxattr()
396 return PTR_ERR(handler); in __vfs_getxattr()
397 if (!handler->get) in __vfs_getxattr()
399 return handler->get(handler, dentry, inode, name, value, size); in __vfs_getxattr()
461 const struct xattr_handler *handler; in __vfs_removexattr() local
463 handler = xattr_resolve_name(inode, &name); in __vfs_removexattr()
464 if (IS_ERR(handler)) in __vfs_removexattr()
465 return PTR_ERR(handler); in __vfs_removexattr()
466 if (!handler->set) in __vfs_removexattr()
468 return handler->set(handler, mnt_userns, dentry, inode, name, NULL, 0, in __vfs_removexattr()
883 const struct xattr_handler *handler, **handlers = dentry->d_sb->s_xattr; in generic_listxattr() local
887 for_each_xattr_handler(handlers, handler) { in generic_listxattr()
888 if (!handler->name || in generic_listxattr()
889 (handler->list && !handler->list(dentry))) in generic_listxattr()
891 size += strlen(handler->name) + 1; in generic_listxattr()
897 for_each_xattr_handler(handlers, handler) { in generic_listxattr()
898 if (!handler->name || in generic_listxattr()
899 (handler->list && !handler->list(dentry))) in generic_listxattr()
901 len = strlen(handler->name); in generic_listxattr()
904 memcpy(buf, handler->name, len + 1); in generic_listxattr()
929 const char *xattr_full_name(const struct xattr_handler *handler, in xattr_full_name() argument
932 size_t prefix_len = strlen(xattr_prefix(handler)); in xattr_full_name()