]> err.no Git - linux-2.6/commitdiff
[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 acb978d9d0859a17a5518dc544d6165c250288f5..48799ba7e3e6f2ded6a46e972a254044c76bb83d 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 fec5ff5a2f176bd9d8f89154ee8c229076fbe25a..cc0f21af48fece708723535dc61ee6782e2c8fc6 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 4d45d9351a6c7d0faef80065b73cc235714be712..a9cd6e4105256a476372ce849273a106d00c732e 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 b49722940d6d748856c0ae7cdf69b39951b6b53c..c9ec44a02e2102a5a4cbdf377c8a7a920cbfd990 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 fc9f3fb39b7b31bfe7d0a778b69c4f7eb049eea7..68adc5fd9b95d29ac188dd24a064700225b9a995 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 3c4beb3a43266585c948f91fefe2a1a7adbb82ea..2f46b67f932021a001b079fad3b23a4e74f74407 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 2211e885ef243d47d690bb9a4bf044cf9bf26504..9e751011e231459d3c54612a832e18b463b341e6 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 46cecba0992802eb86f6b0e53d7e1917bdf7ce1b..cfbafc937ee58bcbb997fc573d0f1a914a5fb298 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 f04e026f6e09e1d19aa1e321e5d08c2601a55a60..4e1e55e9077914edff328915cc38063e58025773 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 9a3ef9dcaeb9063b9be707c4e3f4ea8098822d20..4feda541e71410744238d349033b9a5c9179614b 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 f316cb85d8e234eb21b573a0a59ddfbccc21a922..7b533dfea6039f2b5f0ba69a6b81e1363f080113 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 5f461ce444127d5a6593f2c9e620ed23cfdfa780..38450f1fa2aca0e893128a79939ff98e0728f241 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 a2e470ae259af4ba138665c8c4cef4fcccda40db..35a053fd161b475791d720a207b6e826d04bd990 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);