]> git.neil.brown.name Git - history.git/commitdiff
XFS: Switch from iget_locked to ilookup in vn_get
authorChristoph Hellwig <hch@sgi.com>
Tue, 15 Oct 2002 01:30:01 +0000 (03:30 +0200)
committerChristoph Hellwig <hch@sgi.com>
Tue, 15 Oct 2002 01:30:01 +0000 (03:30 +0200)
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

fs/xfs/linux/xfs_vnode.c

index 133880636f54701149eaef8d3526820c00505bd3..51a855c9a4a0eacf577c36248af869fff2876c6e 100644 (file)
@@ -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);