/* RETURNS: Pointer to @sd on success, NULL on failure.  */
struct sysfs_dirent* sysfs_get_active_two(struct sysfs_dirent *sd)
/* RETURNS: Pointer to @sd on success, NULL on failure.  */
struct sysfs_dirent* sysfs_get_active_two(struct sysfs_dirent *sd)
{
	if (sd) {
		if (sd->s_parent && unlikely(!sysfs_get_active(sd->s_parent)))
			return NULL;
		if (unlikely(!sysfs_get_active(sd))) {
			sysfs_put_active(sd->s_parent);
			return NULL;
		}
	}
	return sd;
}