aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-28 21:53:12 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:40:24 -0400
commit0a74cd1964501fdb577176f14ed3d02b8e148127 (patch)
treeec4aa3dff46b141cd60734bb6c8a0c6b6a2e7111 /fs/xfs/linux-2.6/xfs_vnode.h
parent2aeaa258c0527026228c43148ec6dffdc56bea1c (diff)
[XFS] kill struct bhv_vnode
Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vnode_t as a typedef for struct inode for the time being until all the fallout is cleaned up. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29500a 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_vnode.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h48
1 files changed, 22 insertions, 26 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index a5c14a8d546a..4682c617f3a4 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -26,28 +26,24 @@ struct attrlist_cursor_kern;
26 26
27typedef struct dentry bhv_vname_t; 27typedef struct dentry bhv_vname_t;
28typedef __u64 bhv_vnumber_t; 28typedef __u64 bhv_vnumber_t;
29typedef struct inode bhv_vnode_t;
29 30
30typedef struct bhv_vnode { 31#define VN_ISLNK(vp) S_ISLNK((vp)->i_mode)
31 struct inode v_inode; /* Linux inode */ 32#define VN_ISREG(vp) S_ISREG((vp)->i_mode)
32 /* inode MUST be last */ 33#define VN_ISDIR(vp) S_ISDIR((vp)->i_mode)
33} bhv_vnode_t; 34#define VN_ISCHR(vp) S_ISCHR((vp)->i_mode)
34 35#define VN_ISBLK(vp) S_ISBLK((vp)->i_mode)
35#define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode)
36#define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode)
37#define VN_ISDIR(vp) S_ISDIR((vp)->v_inode.i_mode)
38#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode)
39#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode)
40 36
41/* 37/*
42 * Vnode to Linux inode mapping. 38 * Vnode to Linux inode mapping.
43 */ 39 */
44static inline struct bhv_vnode *vn_from_inode(struct inode *inode) 40static inline bhv_vnode_t *vn_from_inode(struct inode *inode)
45{ 41{
46 return container_of(inode, bhv_vnode_t, v_inode); 42 return inode;
47} 43}
48static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) 44static inline struct inode *vn_to_inode(bhv_vnode_t *vnode)
49{ 45{
50 return &vnode->v_inode; 46 return vnode;
51} 47}
52 48
53/* 49/*
@@ -193,9 +189,9 @@ typedef struct bhv_vattr {
193 189
194extern void vn_init(void); 190extern void vn_init(void);
195extern bhv_vnode_t *vn_initialize(struct inode *); 191extern bhv_vnode_t *vn_initialize(struct inode *);
196extern int vn_revalidate(struct bhv_vnode *); 192extern int vn_revalidate(bhv_vnode_t *);
197extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *); 193extern int __vn_revalidate(bhv_vnode_t *, bhv_vattr_t *);
198extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *); 194extern void vn_revalidate_core(bhv_vnode_t *, bhv_vattr_t *);
199 195
200/* 196/*
201 * Yeah, these don't take vnode anymore at all, all this should be 197 * Yeah, these don't take vnode anymore at all, all this should be
@@ -205,7 +201,7 @@ extern void vn_iowait(struct xfs_inode *ip);
205extern void vn_iowake(struct xfs_inode *ip); 201extern void vn_iowake(struct xfs_inode *ip);
206extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); 202extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
207 203
208static inline int vn_count(struct bhv_vnode *vp) 204static inline int vn_count(bhv_vnode_t *vp)
209{ 205{
210 return atomic_read(&vn_to_inode(vp)->i_count); 206 return atomic_read(&vn_to_inode(vp)->i_count);
211} 207}
@@ -213,7 +209,7 @@ static inline int vn_count(struct bhv_vnode *vp)
213/* 209/*
214 * Vnode reference counting functions (and macros for compatibility). 210 * Vnode reference counting functions (and macros for compatibility).
215 */ 211 */
216extern bhv_vnode_t *vn_hold(struct bhv_vnode *); 212extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
217 213
218#if defined(XFS_VNODE_TRACE) 214#if defined(XFS_VNODE_TRACE)
219#define VN_HOLD(vp) \ 215#define VN_HOLD(vp) \
@@ -227,7 +223,7 @@ extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
227#define VN_RELE(vp) (iput(vn_to_inode(vp))) 223#define VN_RELE(vp) (iput(vn_to_inode(vp)))
228#endif 224#endif
229 225
230static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) 226static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
231{ 227{
232 struct inode *inode = igrab(vn_to_inode(vp)); 228 struct inode *inode = igrab(vn_to_inode(vp));
233 return inode ? vn_from_inode(inode) : NULL; 229 return inode ? vn_from_inode(inode) : NULL;
@@ -243,12 +239,12 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
243/* 239/*
244 * Dealing with bad inodes 240 * Dealing with bad inodes
245 */ 241 */
246static inline void vn_mark_bad(struct bhv_vnode *vp) 242static inline void vn_mark_bad(bhv_vnode_t *vp)
247{ 243{
248 make_bad_inode(vn_to_inode(vp)); 244 make_bad_inode(vn_to_inode(vp));
249} 245}
250 246
251static inline int VN_BAD(struct bhv_vnode *vp) 247static inline int VN_BAD(bhv_vnode_t *vp)
252{ 248{
253 return is_bad_inode(vn_to_inode(vp)); 249 return is_bad_inode(vn_to_inode(vp));
254} 250}
@@ -258,18 +254,18 @@ static inline int VN_BAD(struct bhv_vnode *vp)
258 */ 254 */
259static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) 255static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime)
260{ 256{
261 bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; 257 bs_atime->tv_sec = vp->i_atime.tv_sec;
262 bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; 258 bs_atime->tv_nsec = vp->i_atime.tv_nsec;
263} 259}
264 260
265static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) 261static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts)
266{ 262{
267 *ts = vp->v_inode.i_atime; 263 *ts = vp->i_atime;
268} 264}
269 265
270static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) 266static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
271{ 267{
272 *tt = vp->v_inode.i_atime.tv_sec; 268 *tt = vp->i_atime.tv_sec;
273} 269}
274 270
275/* 271/*