]> git.neil.brown.name Git - history.git/commitdiff
XFS: Set inode operations later in xfs_iget_core
authorChristoph Hellwig <hch@sgi.com>
Mon, 14 Oct 2002 23:56:11 +0000 (01:56 +0200)
committerChristoph Hellwig <hch@sgi.com>
Mon, 14 Oct 2002 23:56:11 +0000 (01:56 +0200)
Modid: 2.5.x-xfs:slinx:128691a

fs/xfs/xfs_iget.c

index 7a8b02b395576e65b21db3a3d29b6236f5c86347..d8a2d9f3c3d727e122aaf8548ea5728cefea1a8e 100644 (file)
@@ -118,13 +118,6 @@ xfs_iget_vnode_init(
 {
        vp->v_vfsp  = XFS_MTOVFS(mp);
        vp->v_type  = IFTOVT(ip->i_d.di_mode);
-
-       /* If we have a real type for an on-disk inode, we can set ops(&unlock)
-        * now.  If it's a new inode being created, xfs_ialloc will handle it.
-        */
-       if (vp->v_type != VNON) {
-               linvfs_set_inode_ops(LINVFS_GET_IP(vp));
-       }
 }
 
 
@@ -159,7 +152,7 @@ xfs_iget_vnode_init(
  * bno -- the block number starting the buffer containing the inode,
  *       if known (as by bulkstat), else 0.
  */
-int
+STATIC int
 xfs_iget_core(
        vnode_t         *vp,
        xfs_mount_t     *mp,
@@ -429,6 +422,14 @@ finish_inode:
 
        *ipp = ip;
 
+       /*
+        * If we have a real type for an on-disk inode, we can set ops(&unlock)
+        * now.  If it's a new inode being created, xfs_ialloc will handle it.
+        */
+       if (vp->v_type != VNON) {
+               linvfs_set_inode_ops(LINVFS_GET_IP(vp));
+       }
+
        /* Update the linux inode */
        error = vn_revalidate(vp, ATTR_COMM|ATTR_LAZY);