aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index 260dd8415dd7..d27c25b27ccd 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -58,7 +58,7 @@ struct vnode *
58vn_initialize( 58vn_initialize(
59 struct inode *inode) 59 struct inode *inode)
60{ 60{
61 struct vnode *vp = LINVFS_GET_VP(inode); 61 struct vnode *vp = vn_from_inode(inode);
62 62
63 XFS_STATS_INC(vn_active); 63 XFS_STATS_INC(vn_active);
64 XFS_STATS_INC(vn_alloc); 64 XFS_STATS_INC(vn_alloc);
@@ -83,7 +83,7 @@ vn_initialize(
83 vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); 83 vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP);
84#endif /* XFS_VNODE_TRACE */ 84#endif /* XFS_VNODE_TRACE */
85 85
86 vn_trace_exit(vp, "vn_initialize", (inst_t *)__return_address); 86 vn_trace_exit(vp, __FUNCTION__, (inst_t *)__return_address);
87 return vp; 87 return vp;
88} 88}
89 89
@@ -97,7 +97,7 @@ vn_revalidate_core(
97 struct vnode *vp, 97 struct vnode *vp,
98 vattr_t *vap) 98 vattr_t *vap)
99{ 99{
100 struct inode *inode = LINVFS_GET_IP(vp); 100 struct inode *inode = vn_to_inode(vp);
101 101
102 inode->i_mode = vap->va_mode; 102 inode->i_mode = vap->va_mode;
103 inode->i_nlink = vap->va_nlink; 103 inode->i_nlink = vap->va_nlink;
@@ -129,24 +129,31 @@ vn_revalidate_core(
129 * Revalidate the Linux inode from the vnode. 129 * Revalidate the Linux inode from the vnode.
130 */ 130 */
131int 131int
132vn_revalidate( 132__vn_revalidate(
133 struct vnode *vp) 133 struct vnode *vp,
134 struct vattr *vattr)
134{ 135{
135 vattr_t va;
136 int error; 136 int error;
137 137
138 vn_trace_entry(vp, "vn_revalidate", (inst_t *)__return_address); 138 vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address);
139 ASSERT(vp->v_fbhv != NULL); 139 vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS;
140 140 VOP_GETATTR(vp, vattr, 0, NULL, error);
141 va.va_mask = XFS_AT_STAT|XFS_AT_XFLAGS; 141 if (likely(!error)) {
142 VOP_GETATTR(vp, &va, 0, NULL, error); 142 vn_revalidate_core(vp, vattr);
143 if (!error) {
144 vn_revalidate_core(vp, &va);
145 VUNMODIFY(vp); 143 VUNMODIFY(vp);
146 } 144 }
147 return -error; 145 return -error;
148} 146}
149 147
148int
149vn_revalidate(
150 struct vnode *vp)
151{
152 vattr_t vattr;
153
154 return __vn_revalidate(vp, &vattr);
155}
156
150/* 157/*
151 * Add a reference to a referenced vnode. 158 * Add a reference to a referenced vnode.
152 */ 159 */
@@ -159,7 +166,7 @@ vn_hold(
159 XFS_STATS_INC(vn_hold); 166 XFS_STATS_INC(vn_hold);
160 167
161 VN_LOCK(vp); 168 VN_LOCK(vp);
162 inode = igrab(LINVFS_GET_IP(vp)); 169 inode = igrab(vn_to_inode(vp));
163 ASSERT(inode); 170 ASSERT(inode);
164 VN_UNLOCK(vp, 0); 171 VN_UNLOCK(vp, 0);
165 172