/* RETURNS: Pointer to allocated inode on success, NULL on failure.  */
struct inode* sysfs_get_inode(struct sysfs_dirent *sd)
/* RETURNS: Pointer to allocated inode on success, NULL on failure.  */
struct inode* sysfs_get_inode(struct sysfs_dirent *sd)
{
	struct inode *inode;
	inode = iget_locked(sysfs_sb, sd->s_ino);
	if (inode && (inode->i_state & I_NEW))
		sysfs_init_inode(sd, inode);
	return inode;
}