aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-28 21:46:47 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:39:25 -0400
commit1543d79c45a374f934f95ca34d87e2eeeb2039b4 (patch)
treeabe537e7c241f2a764687c54d805ebfdb5147e3c /fs/xfs/linux-2.6/xfs_super.c
parentb677c210cec0d6755335ffc01691982c417dd39e (diff)
[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 47bca4e4696b..bb0c4a932fd7 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(
403{ 403{
404 int error = 0, flags = FLUSH_INODE; 404 int error = 0, flags = FLUSH_INODE;
405 405
406 vn_trace_entry(vn_from_inode(inode), __FUNCTION__, 406 vn_trace_entry(XFS_I(inode), __FUNCTION__,
407 (inst_t *)__return_address); 407 (inst_t *)__return_address);
408 if (sync) { 408 if (sync) {
409 filemap_fdatawait(inode->i_mapping); 409 filemap_fdatawait(inode->i_mapping);
@@ -425,34 +425,27 @@ STATIC void
425xfs_fs_clear_inode( 425xfs_fs_clear_inode(
426 struct inode *inode) 426 struct inode *inode)
427{ 427{
428 bhv_vnode_t *vp = vn_from_inode(inode); 428 xfs_inode_t *ip = XFS_I(inode);
429
430 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
431
432 XFS_STATS_INC(vn_rele);
433 XFS_STATS_INC(vn_remove);
434 XFS_STATS_INC(vn_reclaim);
435 XFS_STATS_DEC(vn_active);
436 429
437 /* 430 /*
438 * This can happen because xfs_iget_core calls xfs_idestroy if we 431 * ip can be null when xfs_iget_core calls xfs_idestroy if we
439 * find an inode with di_mode == 0 but without IGET_CREATE set. 432 * find an inode with di_mode == 0 but without IGET_CREATE set.
440 */ 433 */
441 if (XFS_I(inode)) 434 if (ip) {
442 xfs_inactive(XFS_I(inode)); 435 vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address);
443 436
444 437 XFS_STATS_INC(vn_rele);
445 if (XFS_I(inode)) { 438 XFS_STATS_INC(vn_remove);
446 xfs_iflags_clear(XFS_I(inode), XFS_IMODIFIED); 439 XFS_STATS_INC(vn_reclaim);
447 if (xfs_reclaim(XFS_I(inode))) 440 XFS_STATS_DEC(vn_active);
448 panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); 441
442 xfs_inactive(ip);
443 xfs_iflags_clear(ip, XFS_IMODIFIED);
444 if (xfs_reclaim(ip))
445 panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, inode);
449 } 446 }
450 447
451 ASSERT(XFS_I(inode) == NULL); 448 ASSERT(XFS_I(inode) == NULL);
452
453#ifdef XFS_VNODE_TRACE
454 ktrace_free(vp->v_trace);
455#endif
456} 449}
457 450
458/* 451/*
@@ -840,7 +833,8 @@ xfs_fs_fill_super(
840 } 833 }
841 if ((error = xfs_fs_start_syncd(vfsp))) 834 if ((error = xfs_fs_start_syncd(vfsp)))
842 goto fail_vnrele; 835 goto fail_vnrele;
843 vn_trace_exit(rootvp, __FUNCTION__, (inst_t *)__return_address); 836 vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__,
837 (inst_t *)__return_address);
844 838
845 kmem_free(args, sizeof(*args)); 839 kmem_free(args, sizeof(*args));
846 return 0; 840 return 0;