aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-28 20:58:01 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 20:40:00 -0400
commit739bfb2a7dfa369324f74aad1d020d6e0775e4f0 (patch)
tree8fbe3e739e0d550137e3f148a36ce5c083f5ef2c /fs/xfs/xfs_vnodeops.c
parent993386c19afa53fa54d00c7721e56ba820b3400d (diff)
[XFS] call common xfs vnode-level helpers directly and remove vnode operations
SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29493a 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/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 2b30fa690b4a..5eb392d06298 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -592,7 +592,7 @@ xfs_setattr(
592 if (!code && 592 if (!code &&
593 (ip->i_size != ip->i_d.di_size) && 593 (ip->i_size != ip->i_d.di_size) &&
594 (vap->va_size > ip->i_d.di_size)) { 594 (vap->va_size > ip->i_d.di_size)) {
595 code = bhv_vop_flush_pages(XFS_ITOV(ip), 595 code = xfs_flush_pages(ip,
596 ip->i_d.di_size, vap->va_size, 596 ip->i_d.di_size, vap->va_size,
597 XFS_B_ASYNC, FI_NONE); 597 XFS_B_ASYNC, FI_NONE);
598 } 598 }
@@ -864,10 +864,6 @@ xfs_setattr(
864 * racing calls to vop_vnode_change. 864 * racing calls to vop_vnode_change.
865 */ 865 */
866 mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); 866 mandlock_after = MANDLOCK(vp, ip->i_d.di_mode);
867 if (mandlock_before != mandlock_after) {
868 bhv_vop_vnode_change(vp, VCHANGE_FLAGS_ENF_LOCKING,
869 mandlock_after);
870 }
871 867
872 xfs_iunlock(ip, lock_flags); 868 xfs_iunlock(ip, lock_flags);
873 869
@@ -1544,7 +1540,7 @@ xfs_release(
1544 * be exposed to that problem. 1540 * be exposed to that problem.
1545 */ 1541 */
1546 if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) 1542 if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0)
1547 bhv_vop_flush_pages(vp, 0, -1, XFS_B_ASYNC, FI_NONE); 1543 xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE);
1548 } 1544 }
1549 1545
1550#ifdef HAVE_REFCACHE 1546#ifdef HAVE_REFCACHE
@@ -2008,12 +2004,6 @@ xfs_create(
2008 XFS_QM_DQRELE(mp, udqp); 2004 XFS_QM_DQRELE(mp, udqp);
2009 XFS_QM_DQRELE(mp, gdqp); 2005 XFS_QM_DQRELE(mp, gdqp);
2010 2006
2011 /*
2012 * Propagate the fact that the vnode changed after the
2013 * xfs_inode locks have been released.
2014 */
2015 bhv_vop_vnode_change(vp, VCHANGE_FLAGS_TRUNCATED, 3);
2016
2017 *vpp = vp; 2007 *vpp = vp;
2018 2008
2019 /* Fallthrough to std_return with error = 0 */ 2009 /* Fallthrough to std_return with error = 0 */
@@ -2512,11 +2502,6 @@ xfs_remove(
2512 2502
2513 vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); 2503 vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address);
2514 2504
2515 /*
2516 * Let interposed file systems know about removed links.
2517 */
2518 bhv_vop_link_removed(XFS_ITOV(ip), dir_vp, link_zero);
2519
2520 IRELE(ip); 2505 IRELE(ip);
2521 2506
2522/* Fall through to std_return with error = 0 */ 2507/* Fall through to std_return with error = 0 */
@@ -3146,11 +3131,6 @@ xfs_rmdir(
3146 } 3131 }
3147 3132
3148 3133
3149 /*
3150 * Let interposed file systems know about removed links.
3151 */
3152 bhv_vop_link_removed(XFS_ITOV(cdp), dir_vp, last_cdp_link);
3153
3154 IRELE(cdp); 3134 IRELE(cdp);
3155 3135
3156 /* Fall through to std_return with error = 0 or the errno 3136 /* Fall through to std_return with error = 0 or the errno
@@ -3732,7 +3712,8 @@ xfs_reclaim(
3732 XFS_MOUNT_ILOCK(mp); 3712 XFS_MOUNT_ILOCK(mp);
3733 spin_lock(&ip->i_flags_lock); 3713 spin_lock(&ip->i_flags_lock);
3734 __xfs_iflags_set(ip, XFS_IRECLAIMABLE); 3714 __xfs_iflags_set(ip, XFS_IRECLAIMABLE);
3735 vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); 3715 vn_to_inode(vp)->i_private = NULL;
3716 ip->i_vnode = NULL;
3736 spin_unlock(&ip->i_flags_lock); 3717 spin_unlock(&ip->i_flags_lock);
3737 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); 3718 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes);
3738 XFS_MOUNT_IUNLOCK(mp); 3719 XFS_MOUNT_IUNLOCK(mp);
@@ -4214,7 +4195,8 @@ xfs_free_file_space(
4214 if (VN_CACHED(vp) != 0) { 4195 if (VN_CACHED(vp) != 0) {
4215 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, 4196 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1,
4216 ctooff(offtoct(ioffset)), -1); 4197 ctooff(offtoct(ioffset)), -1);
4217 error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), 4198 error = xfs_flushinval_pages(ip,
4199 ctooff(offtoct(ioffset)),
4218 -1, FI_REMAPF_LOCKED); 4200 -1, FI_REMAPF_LOCKED);
4219 if (error) 4201 if (error)
4220 goto out_unlock_iolock; 4202 goto out_unlock_iolock;