vp->v_size = ip->i_e2fs_size;
ext2fs_vget(mp, ino, vpp)	struct mount *mp;	ino_t ino;	struct vnode **vpp;{	register struct m_ext2fs *fs;	register struct inode *ip;	struct ufsmount *ump;	struct buf *bp;	struct vnode *vp;	dev_t dev;	int error;	ump = VFSTOUFS(mp);	dev = ump->um_dev; retry:	if ((*vpp = ufs_ihashget(dev, ino)) != NULL)		return (0);	/* Allocate a new vnode/inode. */	if ((error = getnewvnode(VT_EXT2FS, mp, ext2fs_vnodeop_p, &vp)) != 0) {		*vpp = NULL;		return (error);	}	MALLOC(ip, struct inode *, sizeof(struct inode), M_EXT2FSNODE, M_WAITOK);	bzero((caddr_t)ip, sizeof(struct inode));	lockinit(&ip->i_lock, PINOD, "inode", 0, 0);	vp->v_data = ip;	ip->i_vnode = vp;	ip->i_e2fs = fs = ump->um_e2fs;	ip->i_dev = dev;	ip->i_number = ino;	ip->i_e2fs_last_lblk = 0;	ip->i_e2fs_last_blk = 0;	/*	 * Put it onto its hash chain and lock it so that other requests for	 * this inode will block if they arrive while we are sleeping waiting	 * for old data structures to be purged or for the contents of the	 * disk portion of this inode to be read.	 */	error = ufs_ihashins(ip);	if (error) {		vrele(vp);		if (error == EEXIST)			goto retry;		return (error);	}	/* Read in the disk contents for the inode, copy into the inode. */	error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),			  (int)fs->e2fs_bsize, NOCRED, &bp);	if (error) {		/*		 * The inode does not contain anything useful, so it would	 	 * be misleading to leave it on its hash chain. With mode		 * still zero, it will be unlinked and returned to the free		 * list by vput().		 */		vput(vp);		brelse(bp);		*vpp = NULL;		return (error);	}	bcopy(((struct ext2fs_dinode*)bp->b_data + ino_to_fsbo(fs, ino)),				&ip->i_din, sizeof(struct ext2fs_dinode));	ip->i_effnlink = ip->i_e2fs_nlink;	brelse(bp);	/*	 * Initialize the vnode from the inode, check for aliases.	 * Note that the underlying vnode may have changed.	 */	error = ufs_vinit(mp, ext2fs_specop_p, EXT2FS_FIFOOPS, &vp);	if (error) {		vput(vp);		*vpp = NULL;		return (error);	}	/*	 * Finish inode initialization now that aliasing has been resolved.	 */	genfs_node_init(vp, &ext2fs_genfsops);	ip->i_devvp = ump->um_devvp;	VREF(ip->i_devvp);	/*	 * Set up a generation number for this inode if it does not	 * already have one. This should only happen on old filesystems.	 */	if (ip->i_e2fs_gen == 0) {		if (++ext2gennumber < (u_long)time.tv_sec)			ext2gennumber = time.tv_sec;		ip->i_e2fs_gen = ext2gennumber;		if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0)			ip->i_flag |= IN_MODIFIED;	}	vp->v_size = ip->i_e2fs_size;	*vpp = vp;	return (0);}