[XFS] move v_trace from bhv_vnode to xfs_inode
authorChristoph Hellwig <hch@infradead.org>
Wed, 29 Aug 2007 01:46:47 +0000 (11:46 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Tue, 16 Oct 2007 01:39:25 +0000 (11:39 +1000)
struct bhv_vnode is on it's way out, so move the trace buffer to the XFS
inode. Note that this makes the tracing macros rather misnamed, but this
kind of fallout will be fixed up incrementally later on.

SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29498a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
13 files changed:
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_vnode.c
fs/xfs/linux-2.6/xfs_vnode.h
fs/xfs/xfs_dir2.c
fs/xfs/xfs_iget.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode.h
fs/xfs/xfs_rename.c
fs/xfs/xfs_utils.c
fs/xfs/xfs_utils.h
fs/xfs/xfs_vnodeops.c

index 1dd198ec28904d79f406d6aaf4bd80dd482c82a2..f766c7f74dc0edab7d5496d8b5f095696848bcf0 100644 (file)
@@ -1526,7 +1526,7 @@ xfs_vm_bmap(
        struct inode            *inode = (struct inode *)mapping->host;
        struct xfs_inode        *ip = XFS_I(inode);
 
-       vn_trace_entry(vn_from_inode(inode), __FUNCTION__,
+       vn_trace_entry(XFS_I(inode), __FUNCTION__,
                        (inst_t *)__return_address);
        xfs_rwlock(ip, VRWLOCK_READ);
        xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF);
index 8ff465db909b6100de3130466b23eb4afbb8b352..4c38e27ed18446ce3bbac14f1820bb17d238853d 100644 (file)
@@ -733,7 +733,7 @@ xfs_ioctl(
        xfs_mount_t             *mp = ip->i_mount;
        int                     error;
 
-       vn_trace_entry(vp, "xfs_ioctl", (inst_t *)__return_address);
+       vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address);
 
        switch (cmd) {
 
index 47bca4e4696b311848f7b85e3062e750f43348e3..bb0c4a932fd73a77ab45573142d76652fcb4ea3a 100644 (file)
@@ -403,7 +403,7 @@ xfs_fs_write_inode(
 {
        int                     error = 0, flags = FLUSH_INODE;
 
-       vn_trace_entry(vn_from_inode(inode), __FUNCTION__,
+       vn_trace_entry(XFS_I(inode), __FUNCTION__,
                        (inst_t *)__return_address);
        if (sync) {
                filemap_fdatawait(inode->i_mapping);
@@ -425,34 +425,27 @@ STATIC void
 xfs_fs_clear_inode(
        struct inode            *inode)
 {
-       bhv_vnode_t             *vp = vn_from_inode(inode);
-
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
-
-       XFS_STATS_INC(vn_rele);
-       XFS_STATS_INC(vn_remove);
-       XFS_STATS_INC(vn_reclaim);
-       XFS_STATS_DEC(vn_active);
+       xfs_inode_t             *ip = XFS_I(inode);
 
        /*
-        * This can happen because xfs_iget_core calls xfs_idestroy if we
+        * ip can be null when xfs_iget_core calls xfs_idestroy if we
         * find an inode with di_mode == 0 but without IGET_CREATE set.
         */
-       if (XFS_I(inode))
-               xfs_inactive(XFS_I(inode));
-
-
-       if (XFS_I(inode)) {
-               xfs_iflags_clear(XFS_I(inode), XFS_IMODIFIED);
-               if (xfs_reclaim(XFS_I(inode)))
-                       panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp);
+       if (ip) {
+               vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
+
+               XFS_STATS_INC(vn_rele);
+               XFS_STATS_INC(vn_remove);
+               XFS_STATS_INC(vn_reclaim);
+               XFS_STATS_DEC(vn_active);
+
+               xfs_inactive(ip);
+               xfs_iflags_clear(ip, XFS_IMODIFIED);
+               if (xfs_reclaim(ip))
+                       panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, inode);
        }
 
        ASSERT(XFS_I(inode) == NULL);
-
-#ifdef XFS_VNODE_TRACE
-       ktrace_free(vp->v_trace);
-#endif
 }
 
 /*
@@ -840,7 +833,8 @@ xfs_fs_fill_super(
        }
        if ((error = xfs_fs_start_syncd(vfsp)))
                goto fail_vnrele;
-       vn_trace_exit(rootvp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__,
+                       (inst_t *)__return_address);
 
        kmem_free(args, sizeof(*args));
        return 0;
index bde8d2e7f559d5caf087c97c44b4c296b9874209..9d9464cf8de4de637f785ce5776ef4bdcf8d52ae 100644 (file)
@@ -103,11 +103,6 @@ vn_initialize(
 
        ASSERT(VN_CACHED(vp) == 0);
 
-#ifdef XFS_VNODE_TRACE
-       vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
-#endif /* XFS_VNODE_TRACE */
-
-       vn_trace_exit(vp, __FUNCTION__, (inst_t *)__return_address);
        return vp;
 }
 
@@ -158,7 +153,7 @@ __vn_revalidate(
 {
        int             error;
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address);
        vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
        error = xfs_getattr(xfs_vtoi(vp), vattr, 0);
        if (likely(!error)) {
@@ -196,12 +191,25 @@ vn_hold(
 
 #ifdef XFS_VNODE_TRACE
 
-#define KTRACE_ENTER(vp, vk, s, line, ra)                      \
-       ktrace_enter(   (vp)->v_trace,                          \
+/*
+ * Reference count of Linux inode if present, -1 if the xfs_inode
+ * has no associated Linux inode.
+ */
+static inline int xfs_icount(struct xfs_inode *ip)
+{
+       bhv_vnode_t *vp = XFS_ITOV_NULL(ip);
+
+       if (vp)
+               return vn_count(vp);
+       return -1;
+}
+
+#define KTRACE_ENTER(ip, vk, s, line, ra)                      \
+       ktrace_enter(   (ip)->i_trace,                          \
 /*  0 */               (void *)(__psint_t)(vk),                \
 /*  1 */               (void *)(s),                            \
 /*  2 */               (void *)(__psint_t) line,               \
-/*  3 */               (void *)(__psint_t)(vn_count(vp)),      \
+/*  3 */               (void *)(__psint_t)xfs_icount(ip),      \
 /*  4 */               (void *)(ra),                           \
 /*  5 */               NULL,                                   \
 /*  6 */               (void *)(__psint_t)current_cpu(),       \
@@ -213,32 +221,32 @@ vn_hold(
  * Vnode tracing code.
  */
 void
-vn_trace_entry(bhv_vnode_t *vp, const char *func, inst_t *ra)
+vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-       KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra);
+       KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra);
 }
 
 void
-vn_trace_exit(bhv_vnode_t *vp, const char *func, inst_t *ra)
+vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra)
 {
-       KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra);
+       KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra);
 }
 
 void
-vn_trace_hold(bhv_vnode_t *vp, char *file, int line, inst_t *ra)
+vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-       KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra);
+       KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra);
 }
 
 void
-vn_trace_ref(bhv_vnode_t *vp, char *file, int line, inst_t *ra)
+vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-       KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra);
+       KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra);
 }
 
 void
-vn_trace_rele(bhv_vnode_t *vp, char *file, int line, inst_t *ra)
+vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra)
 {
-       KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra);
+       KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra);
 }
 #endif /* XFS_VNODE_TRACE */
index 321346d95267ed7d812882fffe7fad2b9ea9cdcb..2b161361c1a0af3575e78fa51f9049b8aef06404 100644 (file)
@@ -29,9 +29,6 @@ typedef __u64         bhv_vnumber_t;
 
 typedef struct bhv_vnode {
        bhv_vnumber_t   v_number;               /* in-core vnode number */
-#ifdef XFS_VNODE_TRACE
-       struct ktrace   *v_trace;               /* trace header structure    */
-#endif
        struct inode    v_inode;                /* Linux inode */
        /* inode MUST be last */
 } bhv_vnode_t;
@@ -222,9 +219,9 @@ extern bhv_vnode_t  *vn_hold(struct bhv_vnode *);
 #if defined(XFS_VNODE_TRACE)
 #define VN_HOLD(vp)            \
        ((void)vn_hold(vp),     \
-         vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address))
+         vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address))
 #define VN_RELE(vp)            \
-         (vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \
+         (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
           iput(vn_to_inode(vp)))
 #else
 #define VN_HOLD(vp)            ((void)vn_hold(vp))
@@ -314,21 +311,17 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
 #define        VNODE_KTRACE_REF        4
 #define        VNODE_KTRACE_RELE       5
 
-extern void vn_trace_entry(struct bhv_vnode *, const char *, inst_t *);
-extern void vn_trace_exit(struct bhv_vnode *, const char *, inst_t *);
-extern void vn_trace_hold(struct bhv_vnode *, char *, int, inst_t *);
-extern void vn_trace_ref(struct bhv_vnode *, char *, int, inst_t *);
-extern void vn_trace_rele(struct bhv_vnode *, char *, int, inst_t *);
-
-#define        VN_TRACE(vp)            \
-       vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address)
+extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *);
+extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *);
+extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *);
+extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *);
+extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *);
 #else
 #define        vn_trace_entry(a,b,c)
 #define        vn_trace_exit(a,b,c)
 #define        vn_trace_hold(a,b,c,d)
 #define        vn_trace_ref(a,b,c,d)
 #define        vn_trace_rele(a,b,c,d)
-#define        VN_TRACE(vp)
 #endif
 
 #endif /* __XFS_VNODE_H__ */
index 12001bf0d0cb1701c4234235cd3948b5495b836c..b0f1ee8fcb90abb776a8dbd53f3664d4df189fe3 100644 (file)
@@ -301,7 +301,7 @@ xfs_readdir(
        int             rval;           /* return value */
        int             v;              /* type-checking value */
 
-       vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(dp->i_mount))
                return XFS_ERROR(EIO);
index ee13d6d708c8ddf283c8f6dccd2c0337fae44972..001cec705e288ebcd3f7cc62adb1ee2e6528d6e8 100644 (file)
@@ -157,7 +157,7 @@ again:
                                goto again;
                        }
 
-                       vn_trace_exit(vp, "xfs_iget.alloc",
+                       vn_trace_exit(ip, "xfs_iget.alloc",
                                (inst_t *)__return_address);
 
                        XFS_STATS_INC(xs_ig_found);
@@ -212,7 +212,7 @@ finish_inode:
                        xfs_ilock(ip, lock_flags);
 
                xfs_iflags_clear(ip, XFS_ISTALE);
-               vn_trace_exit(vp, "xfs_iget.found",
+               vn_trace_exit(ip, "xfs_iget.found",
                                        (inst_t *)__return_address);
                goto return_ip;
        }
@@ -234,7 +234,7 @@ finish_inode:
                return error;
        }
 
-       vn_trace_exit(vp, "xfs_iget.alloc", (inst_t *)__return_address);
+       vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address);
 
        xfs_inode_lock_init(ip, vp);
        xfs_iocore_inode_init(ip);
@@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t        *ip,
 {
        bhv_vnode_t     *vp = XFS_ITOV(ip);
 
-       vn_trace_entry(vp, "xfs_iput", (inst_t *)__return_address);
+       vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address);
        xfs_iunlock(ip, lock_flags);
        VN_RELE(vp);
 }
@@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t    *ip,
        bhv_vnode_t     *vp = XFS_ITOV(ip);
        struct inode    *inode = vn_to_inode(vp);
 
-       vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address);
+       vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address);
 
        if ((ip->i_d.di_mode == 0)) {
                ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE));
index 0349e714dc309daf7f1ec43cd0814f2f5eca3750..b82f4e43ef3ecf943cd0750b1eeeed2b0c5b70ba 100644 (file)
@@ -884,6 +884,9 @@ xfs_iread(
         * Initialize inode's trace buffers.
         * Do this before xfs_iformat in case it adds entries.
         */
+#ifdef XFS_VNODE_TRACE
+       ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
+#endif
 #ifdef XFS_BMAP_TRACE
        ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP);
 #endif
@@ -2729,6 +2732,10 @@ xfs_idestroy(
        mrfree(&ip->i_lock);
        mrfree(&ip->i_iolock);
        freesema(&ip->i_flock);
+
+#ifdef XFS_VNODE_TRACE
+       ktrace_free(ip->i_trace);
+#endif
 #ifdef XFS_BMAP_TRACE
        ktrace_free(ip->i_xtrace);
 #endif
index c8bb1a818a52380e4042a1770f76d7e10c139ea1..8a1457280f180cb783faccda42342e7b947cc5dd 100644 (file)
@@ -301,6 +301,9 @@ typedef struct xfs_inode {
        xfs_fsize_t             i_size;         /* in-memory size */
        atomic_t                i_iocount;      /* outstanding I/O count */
        /* Trace buffers per inode. */
+#ifdef XFS_VNODE_TRACE
+       struct ktrace           *i_trace;       /* general inode trace */
+#endif
 #ifdef XFS_BMAP_TRACE
        struct ktrace           *i_xtrace;      /* inode extent list trace */
 #endif
index 2f5c8740b25c2cf1b332fd88708dc8a23f98006c..44ea0ba36476fcd5e21f664cd27b8393ad795dfc 100644 (file)
@@ -247,8 +247,8 @@ xfs_rename(
        int             src_namelen = VNAMELEN(src_vname);
        int             target_namelen = VNAMELEN(target_vname);
 
-       vn_trace_entry(src_dir_vp, "xfs_rename", (inst_t *)__return_address);
-       vn_trace_entry(target_dir_vp, "xfs_rename", (inst_t *)__return_address);
+       vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address);
+       vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address);
 
        /*
         * Find the XFS behavior descriptor for the target directory
index 4a7208ef7faa60f1f16640a9432e6a0ec733bc53..673b405eaa31cfc82d38bff06052a7847e20a4c7 100644 (file)
@@ -73,7 +73,7 @@ xfs_dir_lookup_int(
 {
        int             error;
 
-       vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum);
        if (!error) {
index 35c7a99f50ac4eaba09f80d7958a29a471056c01..a00b26d8840e75f8e802c3c37da496ab4b342cd5 100644 (file)
@@ -20,7 +20,7 @@
 
 #define IRELE(ip)      VN_RELE(XFS_ITOV(ip))
 #define IHOLD(ip)      VN_HOLD(XFS_ITOV(ip))
-#define        ITRACE(ip)      vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \
+#define        ITRACE(ip)      vn_trace_ref(ip, __FILE__, __LINE__, \
                                (inst_t *)__return_address)
 
 extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **);
index e7ef78fb4da31ccc776795768545c8be9fd4854a..98653793b34a02139766eb0705f6c8fd0531d0ce 100644 (file)
@@ -88,7 +88,7 @@ xfs_getattr(
        bhv_vnode_t     *vp = XFS_ITOV(ip);
        xfs_mount_t     *mp = ip->i_mount;
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
@@ -228,7 +228,7 @@ xfs_setattr(
        int                     file_owner;
        int                     need_iolock = 1;
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY)
                return XFS_ERROR(EROFS);
@@ -915,7 +915,7 @@ xfs_access(
 {
        int             error;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        xfs_ilock(ip, XFS_ILOCK_SHARED);
        error = xfs_iaccess(ip, mode, credp);
@@ -987,7 +987,7 @@ xfs_readlink(
        int             pathlen;
        int             error = 0;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
@@ -1033,7 +1033,7 @@ xfs_fsync(
        int             error;
        int             log_flushed = 0, changed = 1;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        ASSERT(start >= 0 && stop >= -1);
 
@@ -1592,7 +1592,7 @@ xfs_inactive(
        int             error;
        int             truncate;
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        /*
         * If the inode is already free, then there can be nothing
@@ -1805,7 +1805,7 @@ xfs_lookup(
        int                     error;
        uint                    lock_mode;
 
-       vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(dp->i_mount))
                return XFS_ERROR(EIO);
@@ -1849,7 +1849,7 @@ xfs_create(
        int                     namelen;
 
        ASSERT(!*vpp);
-       vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        dm_di_mode = vap->va_mode;
        namelen = VNAMELEN(dentry);
@@ -2326,7 +2326,7 @@ xfs_remove(
        uint                    resblks;
        int                     namelen;
 
-       vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
@@ -2369,7 +2369,7 @@ xfs_remove(
 
        dm_di_mode = ip->i_d.di_mode;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        ITRACE(ip);
 
@@ -2503,7 +2503,7 @@ xfs_remove(
        if (link_zero && xfs_inode_is_filestream(ip))
                xfs_filestream_deassociate(ip);
 
-       vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address);
 
        IRELE(ip);
 
@@ -2567,8 +2567,8 @@ xfs_link(
        char                    *target_name = VNAME(dentry);
        int                     target_namelen;
 
-       vn_trace_entry(target_dir_vp, __FUNCTION__, (inst_t *)__return_address);
-       vn_trace_entry(src_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(tdp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(xfs_vtoi(src_vp), __FUNCTION__, (inst_t *)__return_address);
 
        target_namelen = VNAMELEN(dentry);
        ASSERT(!VN_ISDIR(src_vp));
@@ -2751,7 +2751,7 @@ xfs_mkdir(
 
        /* Return through std_return after this point. */
 
-       vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        mp = dp->i_mount;
        udqp = gdqp = NULL;
@@ -2945,7 +2945,7 @@ xfs_rmdir(
        int                     last_cdp_link;
        uint                    resblks;
 
-       vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
@@ -3198,7 +3198,7 @@ xfs_symlink(
        ip = NULL;
        tp = NULL;
 
-       vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address);
 
 
        if (XFS_FORCED_SHUTDOWN(mp))
@@ -3490,7 +3490,7 @@ xfs_fid2(
 {
        xfs_fid2_t      *xfid = (xfs_fid2_t *)fidp;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
        ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t));
 
        xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len);
@@ -3673,7 +3673,7 @@ xfs_reclaim(
 {
        bhv_vnode_t     *vp = XFS_ITOV(ip);
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        ASSERT(!VN_MAPPED(vp));
 
@@ -3891,7 +3891,7 @@ xfs_alloc_file_space(
        int                     committed;
        int                     error;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
@@ -4161,7 +4161,7 @@ xfs_free_file_space(
        vp = XFS_ITOV(ip);
        mp = ip->i_mount;
 
-       vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        if ((error = XFS_QM_DQATTACH(mp, ip, 0)))
                return error;
@@ -4367,7 +4367,7 @@ xfs_change_file_space(
        xfs_trans_t     *tp;
        bhv_vattr_t     va;
 
-       vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
+       vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
 
        /*
         * must be a regular file and have write permission