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()
144 const struct xattr_handler *handler; in xattr_supported_namespace() local
155 for_each_xattr_handler(handlers, handler) { in xattr_supported_namespace()
156 if (!strncmp(xattr_prefix(handler), prefix, preflen)) in xattr_supported_namespace()
168 const struct xattr_handler *handler; in __vfs_setxattr() local
170 handler = xattr_resolve_name(inode, &name); in __vfs_setxattr()
171 if (IS_ERR(handler)) in __vfs_setxattr()
172 return PTR_ERR(handler); in __vfs_setxattr()
173 if (!handler->set) in __vfs_setxattr()
177 return handler->set(handler, dentry, inode, name, value, size, flags); in __vfs_setxattr()
334 const struct xattr_handler *handler; in vfs_getxattr_alloc() local
343 handler = xattr_resolve_name(inode, &name); in vfs_getxattr_alloc()
344 if (IS_ERR(handler)) in vfs_getxattr_alloc()
345 return PTR_ERR(handler); in vfs_getxattr_alloc()
346 if (!handler->get) in vfs_getxattr_alloc()
348 error = handler->get(handler, dentry, inode, name, NULL, 0); in vfs_getxattr_alloc()
359 error = handler->get(handler, dentry, inode, name, value, error); in vfs_getxattr_alloc()
368 const struct xattr_handler *handler; in __vfs_getxattr() local
370 handler = xattr_resolve_name(inode, &name); in __vfs_getxattr()
371 if (IS_ERR(handler)) in __vfs_getxattr()
372 return PTR_ERR(handler); in __vfs_getxattr()
373 if (!handler->get) in __vfs_getxattr()
375 return handler->get(handler, dentry, inode, name, value, size); in __vfs_getxattr()
434 const struct xattr_handler *handler; in __vfs_removexattr() local
436 handler = xattr_resolve_name(inode, &name); in __vfs_removexattr()
437 if (IS_ERR(handler)) in __vfs_removexattr()
438 return PTR_ERR(handler); in __vfs_removexattr()
439 if (!handler->set) in __vfs_removexattr()
441 return handler->set(handler, dentry, inode, name, NULL, 0, XATTR_REPLACE); in __vfs_removexattr()
849 const struct xattr_handler *handler, **handlers = dentry->d_sb->s_xattr; in generic_listxattr() local
853 for_each_xattr_handler(handlers, handler) { in generic_listxattr()
854 if (!handler->name || in generic_listxattr()
855 (handler->list && !handler->list(dentry))) in generic_listxattr()
857 size += strlen(handler->name) + 1; in generic_listxattr()
863 for_each_xattr_handler(handlers, handler) { in generic_listxattr()
864 if (!handler->name || in generic_listxattr()
865 (handler->list && !handler->list(dentry))) in generic_listxattr()
867 len = strlen(handler->name); in generic_listxattr()
870 memcpy(buf, handler->name, len + 1); in generic_listxattr()
895 const char *xattr_full_name(const struct xattr_handler *handler, in xattr_full_name() argument
898 size_t prefix_len = strlen(xattr_prefix(handler)); in xattr_full_name()