]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_iget.c
[XFS] sanitize xfs_initialize_vnode
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_iget.c
index b07604b94d9f32c2f15e7eb08c5e83b458b3fd42..539c2dd8eae8b8d9f42b706d42d1ebc4727c53ec 100644 (file)
@@ -287,11 +287,18 @@ finish_inode:
        xfs_iflags_set(ip, XFS_IMODIFIED);
        *ipp = ip;
 
+       /*
+        * Set up the Linux with the Linux inode.
+        */
+       ip->i_vnode = inode;
+       inode->i_private = 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.
         */
-       xfs_initialize_vnode(mp, inode, ip);
+       if (ip->i_d.di_mode != 0)
+               xfs_setup_inode(ip);
        return 0;
 }
 
@@ -411,10 +418,11 @@ xfs_iput(xfs_inode_t      *ip,
  * Special iput for brand-new inodes that are still locked
  */
 void
-xfs_iput_new(xfs_inode_t       *ip,
-            uint               lock_flags)
+xfs_iput_new(
+       xfs_inode_t     *ip,
+       uint            lock_flags)
 {
-       struct inode    *inode = ip->i_vnode;
+       struct inode    *inode = VFS_I(ip);
 
        xfs_itrace_entry(ip);