]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_ioctl.c
[PATCH] switch all filesystems over to d_obtain_alias
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_ioctl.c
index acb978d9d0859a17a5518dc544d6165c250288f5..d3438c72dcaf555b8d18174a00d1b6eab264615f 100644 (file)
@@ -245,7 +245,7 @@ xfs_vget_fsop_handlereq(
 
        xfs_iunlock(ip, XFS_ILOCK_SHARED);
 
-       *inode = XFS_ITOV(ip);
+       *inode = VFS_I(ip);
        return 0;
 }
 
@@ -311,11 +311,10 @@ xfs_open_by_handle(
                return new_fd;
        }
 
-       dentry = d_alloc_anon(inode);
-       if (dentry == NULL) {
-               iput(inode);
+       dentry = d_obtain_alias(inode);
+       if (IS_ERR(dentry)) {
                put_unused_fd(new_fd);
-               return -XFS_ERROR(ENOMEM);
+               return PTR_ERR(dentry);
        }
 
        /* Ensure umount returns EBUSY on umounts while this file is open. */
@@ -927,7 +926,7 @@ STATIC void
 xfs_diflags_to_linux(
        struct xfs_inode        *ip)
 {
-       struct inode            *inode = XFS_ITOV(ip);
+       struct inode            *inode = VFS_I(ip);
        unsigned int            xflags = xfs_ip2xflags(ip);
 
        if (xflags & XFS_XFLAG_IMMUTABLE)