summaryrefslogtreecommitdiff
path: root/fs/xfs/linux-2.6/xfs_vnode.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-08-13 16:12:05 +1000
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 16:12:05 +1000
commit863890cd90e8b213f7028036c6e2200d93223527 (patch)
tree3b4312d515113e4b19d7e82fea9902c69d183d60 /fs/xfs/linux-2.6/xfs_vnode.h
parenta19d033cd2cc66120f01b370ec081d67b59b7924 (diff)
[XFS] kill vn_to_inode
bhv_vnode_t is just a typedef for struct inode, so there's no need for a helper to convert between the two. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31761a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 536515cad90e..cc53687ff826 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -25,14 +25,6 @@ struct attrlist_cursor_kern;
typedef struct inode bhv_vnode_t;
/*
- * Vnode to Linux inode mapping.
- */
-static inline struct inode *vn_to_inode(bhv_vnode_t *vnode)
-{
- return vnode;
-}
-
-/*
* Return values for xfs_inactive. A return value of
* VN_INACTIVE_NOCACHE implies that the file system behavior
* has disassociated its state and bhv_desc_t from the vnode.
@@ -74,7 +66,7 @@ extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
static inline int vn_count(bhv_vnode_t *vp)
{
- return atomic_read(&vn_to_inode(vp)->i_count);
+ return atomic_read(&vp->i_count);
}
/*
@@ -88,15 +80,15 @@ extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
xfs_itrace_hold(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address))
#define VN_RELE(vp) \
(xfs_itrace_rele(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
- iput(vn_to_inode(vp)))
+ iput(vp))
#else
#define VN_HOLD(vp) ((void)vn_hold(vp))
-#define VN_RELE(vp) (iput(vn_to_inode(vp)))
+#define VN_RELE(vp) (iput(vp))
#endif
static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
{
- return igrab(vn_to_inode(vp));
+ return igrab(vp);
}
/*
@@ -104,7 +96,7 @@ static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
*/
static inline int VN_BAD(bhv_vnode_t *vp)
{
- return is_bad_inode(vn_to_inode(vp));
+ return is_bad_inode(vp);
}
/*
@@ -129,9 +121,9 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
/*
* Some useful predicates.
*/
-#define VN_MAPPED(vp) mapping_mapped(vn_to_inode(vp)->i_mapping)
-#define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages)
-#define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \
+#define VN_MAPPED(vp) mapping_mapped(vp->i_mapping)
+#define VN_CACHED(vp) (vp->i_mapping->nrpages)
+#define VN_DIRTY(vp) mapping_tagged(vp->i_mapping, \
PAGECACHE_TAG_DIRTY)