diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-09-04 18:23:54 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-09-04 18:23:54 -0400 |
commit | 56d433e430eb399a4b6d0e73d28af6e1d4713547 (patch) | |
tree | d43aa8b457e52d80254e8c621b01ecc5b20d05ab /fs/xfs/linux-2.6/xfs_super.c | |
parent | c1a073bdff997216eac25254a2716faf640e4e8d (diff) |
[XFS] streamline the clear_inode path
SGI-PV: 940531
SGI-Modid: xfs-linux:xfs-kern:196888a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 1a0bcbbc0a86..9b40a2799f7e 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -383,17 +383,33 @@ linvfs_clear_inode( | |||
383 | struct inode *inode) | 383 | struct inode *inode) |
384 | { | 384 | { |
385 | vnode_t *vp = LINVFS_GET_VP(inode); | 385 | vnode_t *vp = LINVFS_GET_VP(inode); |
386 | int error, cache; | ||
386 | 387 | ||
387 | if (vp) { | 388 | vn_trace_entry(vp, "clear_inode", (inst_t *)__return_address); |
388 | vn_rele(vp); | 389 | |
389 | vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); | 390 | ASSERT(vp->v_fbhv != NULL); |
390 | /* | 391 | |
391 | * Do all our cleanup, and remove this vnode. | 392 | XFS_STATS_INC(vn_rele); |
392 | */ | 393 | XFS_STATS_INC(vn_remove); |
393 | vn_remove(vp); | 394 | XFS_STATS_INC(vn_reclaim); |
394 | } | 395 | XFS_STATS_DEC(vn_active); |
395 | } | ||
396 | 396 | ||
397 | VOP_INACTIVE(vp, NULL, cache); | ||
398 | |||
399 | VN_LOCK(vp); | ||
400 | vp->v_flag &= ~VMODIFIED; | ||
401 | VN_UNLOCK(vp, 0); | ||
402 | |||
403 | VOP_RECLAIM(vp, error); | ||
404 | if (error) | ||
405 | panic("vn_purge: cannot reclaim"); | ||
406 | |||
407 | ASSERT(vp->v_fbhv == NULL); | ||
408 | |||
409 | #ifdef XFS_VNODE_TRACE | ||
410 | ktrace_free(vp->v_trace); | ||
411 | #endif | ||
412 | } | ||
397 | 413 | ||
398 | /* | 414 | /* |
399 | * Enqueue a work item to be picked up by the vfs xfssyncd thread. | 415 | * Enqueue a work item to be picked up by the vfs xfssyncd thread. |