FreeBSD/sys/ufs/ufs/ufs_extattr.c
/*
 * Locate an attribute given a name and mountpoint.
 * Must be holding uepm lock for the mount point.
 */
Locate an attribute given a name and mountpoint.
Must be holding uepm lock for the mount point.
Locate an attribute given a name and mountpoint . Must be holding uepm lock for the mount point .
static struct ufs_extattr_list_entry *
ufs_extattr_find_attr(struct ufsmount *ump, int attrnamespace,
    const char *attrname)
{
	struct ufs_extattr_list_entry *search_attribute;
	sx_assert(&ump->um_extattr.uepm_lock, SA_XLOCKED);
	for (search_attribute = LIST_FIRST(&ump->um_extattr.uepm_list);
	    search_attribute != NULL;
	    search_attribute = LIST_NEXT(search_attribute, uele_entries)) {
		if (!(strncmp(attrname, search_attribute->uele_attrname,
		    UFS_EXTATTR_MAXEXTATTRNAME)) &&
		    (attrnamespace == search_attribute->uele_attrnamespace)) {
			return (search_attribute);
		}
	}
	return (0);
}
static struct ufs_extattr_list_entry * ufs_extattr_find_attr ( struct ufsmount * ump , int attrnamespace , const char * attrname ) { struct ufs_extattr_list_entry * search_attribute ; sx_assert ( & ump -> um_extattr . uepm_lock , SA_XLOCKED ) ; for ( search_attribute = LIST_FIRST ( & ump -> um_extattr . uepm_list ) ; search_attribute != NULL ; search_attribute = LIST_NEXT ( search_attribute , uele_entries ) ) { if ( ! ( strncmp ( attrname , search_attribute -> uele_attrname , UFS_EXTATTR_MAXEXTATTRNAME ) ) && ( attrnamespace == search_attribute -> uele_attrnamespace ) ) { return ( search_attribute ) ; } } return ( 0 ) ; }
Locate an attribute given a name and mountpoint.
Locate an attribute given a name and mountpoint .