FreeBSD/sys/ufs/ufs/ufs_extattr.c
/*
 * Stop extended attribute support on an FS.
 */
Stop extended attribute support on an FS.
Stop extended attribute support on an FS .
int
ufs_extattr_stop(struct mount *mp, struct thread *td)
{
	struct ufs_extattr_list_entry *uele;
	struct ufsmount *ump = VFSTOUFS(mp);
	int error = 0;
	ufs_extattr_uepm_lock(ump);
	if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)) {
		error = EOPNOTSUPP;
		goto unlock;
	}
	while ((uele = LIST_FIRST(&ump->um_extattr.uepm_list)) != NULL) {
		ufs_extattr_disable(ump, uele->uele_attrnamespace,
		    uele->uele_attrname, td);
	}
	ump->um_extattr.uepm_flags &= ~UFS_EXTATTR_UEPM_STARTED;
	crfree(ump->um_extattr.uepm_ucred);
	ump->um_extattr.uepm_ucred = NULL;
unlock:
	ufs_extattr_uepm_unlock(ump);
	return (error);
}
int ufs_extattr_stop ( struct mount * mp , struct thread * td ) { struct ufs_extattr_list_entry * uele ; struct ufsmount * ump = VFSTOUFS ( mp ) ; int error = 0 ; ufs_extattr_uepm_lock ( ump ) ; if ( ! ( ump -> um_extattr . uepm_flags & UFS_EXTATTR_UEPM_STARTED ) ) { error = EOPNOTSUPP ; goto unlock ; } while ( ( uele = LIST_FIRST ( & ump -> um_extattr . uepm_list ) ) != NULL ) { ufs_extattr_disable ( ump , uele -> uele_attrnamespace , uele -> uele_attrname , td ) ; } ump -> um_extattr . uepm_flags &= ~ UFS_EXTATTR_UEPM_STARTED ; crfree ( ump -> um_extattr . uepm_ucred ) ; ump -> um_extattr . uepm_ucred = NULL ; unlock : ufs_extattr_uepm_unlock ( ump ) ; return ( error ) ; }
Stop extended attribute support on an FS.
Stop extended attribute support on an FS .