aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-29 11:46:47 +1000
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-16 11:39:25 +1000
commit1543d79c45a374f934f95ca34d87e2eeeb2039b4 (patch)
treeabe537e7c241f2a764687c54d805ebfdb5147e3c /fs/xfs/linux-2.6/xfs_super.c
parentb677c210cec0d6755335ffc01691982c417dd39e (diff)
downloadkernel_samsung_smdk4412-1543d79c45a374f934f95ca34d87e2eeeb2039b4.zip
kernel_samsung_smdk4412-1543d79c45a374f934f95ca34d87e2eeeb2039b4.tar.gz
kernel_samsung_smdk4412-1543d79c45a374f934f95ca34d87e2eeeb2039b4.tar.bz2
[XFS] move v_trace from bhv_vnode to xfs_inode
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>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c40
1 files changed, 17 insertions, 23 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 47bca4e..bb0c4a9 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -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;