[XFS] Kill shouty XFS_ITOV() macro
authorDavid Chinner <david@fromorbit.com>
Wed, 13 Aug 2008 06:00:45 +0000 (16:00 +1000)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Wed, 13 Aug 2008 06:00:45 +0000 (16:00 +1000)
Replace XFS_ITOV() with the new VFS_I() inline.

SGI-PV: 981498

SGI-Modid: xfs-linux-melb:xfs-kern:31724a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
13 files changed:
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/linux-2.6/xfs_iops.c
fs/xfs/linux-2.6/xfs_linux.h
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/quota/xfs_dquot.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_itable.c
fs/xfs/xfs_utils.h
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vnodeops.c

index acb978d..48799ba 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;
 }
 
@@ -927,7 +927,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)
index fec5ff5..cc0f21a 100644 (file)
@@ -101,7 +101,7 @@ xfs_ichgtime(
        xfs_inode_t     *ip,
        int             flags)
 {
-       struct inode    *inode = vn_to_inode(XFS_ITOV(ip));
+       struct inode    *inode = VFS_I(ip);
        timespec_t      tv;
 
        nanotime(&tv);
index 4d45d93..a9cd6e4 100644 (file)
 #define xfs_sort(a,n,s,fn)     sort(a,n,s,fn,NULL)
 #define xfs_stack_trace()      dump_stack()
 #define xfs_itruncate_data(ip, off)    \
-       (-vmtruncate(vn_to_inode(XFS_ITOV(ip)), (off)))
+       (-vmtruncate(vn_to_inode(VFS_I(ip)), (off)))
 
 
 /* Move the kernel do_div definition off to one side */
index b497229..c9ec44a 100644 (file)
@@ -1131,7 +1131,7 @@ void
 xfs_flush_device(
        xfs_inode_t     *ip)
 {
-       struct inode    *inode = vn_to_inode(XFS_ITOV(ip));
+       struct inode    *inode = VFS_I(ip);
 
        igrab(inode);
        xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_device_work);
index fc9f3fb..68adc5f 100644 (file)
@@ -431,7 +431,7 @@ xfs_qm_dqalloc(
         * when it unlocks the inode. Since we want to keep the quota
         * inode around, we bump the vnode ref count now.
         */
-       VN_HOLD(XFS_ITOV(quotip));
+       VN_HOLD(VFS_I(quotip));
 
        xfs_trans_ijoin(tp, quotip, XFS_ILOCK_EXCL);
        nmaps = 1;
index 3c4beb3..2f46b67 100644 (file)
@@ -4000,7 +4000,7 @@ xfs_bmap_add_attrfork(
                ip->i_d.di_aformat = XFS_DINODE_FMT_EXTENTS;
        }
        ASSERT(ip->i_d.di_anextents == 0);
-       VN_HOLD(XFS_ITOV(ip));
+       VN_HOLD(VFS_I(ip));
        xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
        switch (ip->i_d.di_format) {
index 2211e88..9e75101 100644 (file)
@@ -150,8 +150,8 @@ xfs_swap_extents(
        }
 
        sbp = &sxp->sx_stat;
-       vp = XFS_ITOV(ip);
-       tvp = XFS_ITOV(tip);
+       vp = VFS_I(ip);
+       tvp = VFS_I(tip);
 
        /* Lock in i_ino order */
        if (ip->i_ino < tip->i_ino) {
index 46cecba..cfbafc9 100644 (file)
@@ -1408,7 +1408,7 @@ xfs_itruncate_start(
               (flags == XFS_ITRUNC_MAYBE));
 
        mp = ip->i_mount;
-       vp = XFS_ITOV(ip);
+       vp = VFS_I(ip);
 
        /* wait for the completion of any pending DIOs */
        if (new_size < ip->i_size)
index f04e026..4e1e55e 100644 (file)
@@ -279,7 +279,6 @@ static inline struct inode *VFS_I(struct xfs_inode *ip)
 {
        return (struct inode *)ip->i_vnode;
 }
-#define        XFS_ITOV(ip)            VFS_I(ip)
 
 /*
  * i_flags helper functions
index 9a3ef9d..4feda54 100644 (file)
@@ -72,7 +72,7 @@ xfs_bulkstat_one_iget(
        ASSERT(ip != NULL);
        ASSERT(ip->i_blkno != (xfs_daddr_t)0);
 
-       vp = XFS_ITOV(ip);
+       vp = VFS_I(ip);
        dic = &ip->i_d;
 
        /* xfs_iget returns the following without needing
index f316cb8..7b533df 100644 (file)
@@ -18,8 +18,8 @@
 #ifndef __XFS_UTILS_H__
 #define __XFS_UTILS_H__
 
-#define IRELE(ip)      VN_RELE(XFS_ITOV(ip))
-#define IHOLD(ip)      VN_HOLD(XFS_ITOV(ip))
+#define IRELE(ip)      VN_RELE(VFS_I(ip))
+#define IHOLD(ip)      VN_HOLD(VFS_I(ip))
 
 extern int xfs_truncate_file(xfs_mount_t *, xfs_inode_t *);
 extern int xfs_dir_ialloc(xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t,
index 5f461ce..38450f1 100644 (file)
@@ -128,7 +128,7 @@ xfs_unmount_flush(
        xfs_inode_t     *rip = mp->m_rootip;
        xfs_inode_t     *rbmip;
        xfs_inode_t     *rsumip = NULL;
-       bhv_vnode_t     *rvp = XFS_ITOV(rip);
+       bhv_vnode_t     *rvp = VFS_I(rip);
        int             error;
 
        xfs_ilock(rip, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT);
@@ -146,7 +146,7 @@ xfs_unmount_flush(
                if (error == EFSCORRUPTED)
                        goto fscorrupt_out;
 
-               ASSERT(vn_count(XFS_ITOV(rbmip)) == 1);
+               ASSERT(vn_count(VFS_I(rbmip)) == 1);
 
                rsumip = mp->m_rsumip;
                xfs_ilock(rsumip, XFS_ILOCK_EXCL);
@@ -157,7 +157,7 @@ xfs_unmount_flush(
                if (error == EFSCORRUPTED)
                        goto fscorrupt_out;
 
-               ASSERT(vn_count(XFS_ITOV(rsumip)) == 1);
+               ASSERT(vn_count(VFS_I(rsumip)) == 1);
        }
 
        /*
@@ -479,7 +479,7 @@ xfs_sync_inodes(
                        IPOINTER_INSERT(ip, mp);
                        xfs_ilock(ip, lock_flags);
 
-                       ASSERT(vp == XFS_ITOV(ip));
+                       ASSERT(vp == VFS_I(ip));
                        ASSERT(ip->i_mount == mp);
 
                        vnode_refed = B_TRUE;
index a2e470a..35a053f 100644 (file)
@@ -83,7 +83,7 @@ xfs_setattr(
        cred_t                  *credp)
 {
        xfs_mount_t             *mp = ip->i_mount;
-       struct inode            *inode = XFS_ITOV(ip);
+       struct inode            *inode = VFS_I(ip);
        int                     mask = iattr->ia_valid;
        xfs_trans_t             *tp;
        int                     code;
@@ -714,7 +714,7 @@ xfs_fsync(
                return XFS_ERROR(EIO);
 
        /* capture size updates in I/O completion before writing the inode. */
-       error = filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping);
+       error = filemap_fdatawait(vn_to_inode(VFS_I(ip))->i_mapping);
        if (error)
                return XFS_ERROR(error);
 
@@ -1160,7 +1160,7 @@ int
 xfs_release(
        xfs_inode_t     *ip)
 {
-       bhv_vnode_t     *vp = XFS_ITOV(ip);
+       bhv_vnode_t     *vp = VFS_I(ip);
        xfs_mount_t     *mp = ip->i_mount;
        int             error;
 
@@ -1227,7 +1227,7 @@ int
 xfs_inactive(
        xfs_inode_t     *ip)
 {
-       bhv_vnode_t     *vp = XFS_ITOV(ip);
+       bhv_vnode_t     *vp = VFS_I(ip);
        xfs_bmap_free_t free_list;
        xfs_fsblock_t   first_block;
        int             committed;
@@ -2873,7 +2873,7 @@ int
 xfs_reclaim(
        xfs_inode_t     *ip)
 {
-       bhv_vnode_t     *vp = XFS_ITOV(ip);
+       bhv_vnode_t     *vp = VFS_I(ip);
 
        xfs_itrace_entry(ip);
 
@@ -3341,7 +3341,7 @@ xfs_free_file_space(
        xfs_trans_t             *tp;
        int                     need_iolock = 1;
 
-       vp = XFS_ITOV(ip);
+       vp = VFS_I(ip);
        mp = ip->i_mount;
 
        xfs_itrace_entry(ip);