/* The only thing special about this is that we remove any files in the directory before we remove the directory, and we've inlined what used to be sysfs_rmdir() below, instead of calling separately.  */
void sysfs_remove_dir(struct kobject *kobj)
/* The only thing special about this is that we remove any files in the directory before we remove the directory, and we've inlined what used to be sysfs_rmdir() below, instead of calling separately.  */
void sysfs_remove_dir(struct kobject *kobj)
{
	struct sysfs_dirent *sd = kobj->sd;
	spin_lock(&sysfs_assoc_lock);
	kobj->sd = NULL;
	spin_unlock(&sysfs_assoc_lock);
	__sysfs_remove_dir(sd);
}