From: Christoph Hellwig Date: Tue, 15 Oct 2002 01:30:01 +0000 (+0200) Subject: XFS: Switch from iget_locked to ilookup in vn_get X-Git-Tag: v2.5.43~12^2~6^2 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=32a9dde1fe9114ae2770d4b510c4b124137b84d3;p=history.git XFS: Switch from iget_locked to ilookup in vn_get We only want to get the inode if it actually is present in core. The new ilookup function allows us to do this easily instead of having to tear down the wrongly allocated inode again if it wasn't in memory. Modid: 2.5.x-xfs:slinx:129883a --- diff --git a/fs/xfs/linux/xfs_vnode.c b/fs/xfs/linux/xfs_vnode.c index 133880636f54..51a855c9a4a0 100644 --- a/fs/xfs/linux/xfs_vnode.c +++ b/fs/xfs/linux/xfs_vnode.c @@ -179,20 +179,10 @@ vn_get(struct vnode *vp, vmap_t *vmap) if (inode->i_state & I_FREEING) return NULL; - inode = iget_locked(vmap->v_vfsp->vfs_super, vmap->v_ino); + inode = ilookup(vmap->v_vfsp->vfs_super, vmap->v_ino); if (inode == NULL) /* Inode not present */ return NULL; - /* We do not want to create new inodes via vn_get, - * returning NULL here is OK. - */ - if (inode->i_state & I_NEW) { - make_bad_inode(inode); - unlock_new_inode(inode); - iput(inode); - return NULL; - } - vn_trace_exit(vp, "vn_get", (inst_t *)__return_address); ASSERT((vp->v_flag & VPURGE) == 0);