diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-08-13 02:12:05 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-08-13 02:12:05 -0400 |
commit | 863890cd90e8b213f7028036c6e2200d93223527 (patch) | |
tree | 3b4312d515113e4b19d7e82fea9902c69d183d60 /fs/xfs/linux-2.6/xfs_vnode.h | |
parent | a19d033cd2cc66120f01b370ec081d67b59b7924 (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.h | 24 |
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; | |||
25 | typedef struct inode bhv_vnode_t; | 25 | typedef struct inode bhv_vnode_t; |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Vnode to Linux inode mapping. | ||
29 | */ | ||
30 | static inline struct inode *vn_to_inode(bhv_vnode_t *vnode) | ||
31 | { | ||
32 | return vnode; | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * Return values for xfs_inactive. A return value of | 28 | * Return values for xfs_inactive. A return value of |
37 | * VN_INACTIVE_NOCACHE implies that the file system behavior | 29 | * VN_INACTIVE_NOCACHE implies that the file system behavior |
38 | * has disassociated its state and bhv_desc_t from the vnode. | 30 | * 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); | |||
74 | 66 | ||
75 | static inline int vn_count(bhv_vnode_t *vp) | 67 | static inline int vn_count(bhv_vnode_t *vp) |
76 | { | 68 | { |
77 | return atomic_read(&vn_to_inode(vp)->i_count); | 69 | return atomic_read(&vp->i_count); |
78 | } | 70 | } |
79 | 71 | ||
80 | /* | 72 | /* |
@@ -88,15 +80,15 @@ extern bhv_vnode_t *vn_hold(bhv_vnode_t *); | |||
88 | xfs_itrace_hold(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address)) | 80 | xfs_itrace_hold(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address)) |
89 | #define VN_RELE(vp) \ | 81 | #define VN_RELE(vp) \ |
90 | (xfs_itrace_rele(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ | 82 | (xfs_itrace_rele(XFS_I(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ |
91 | iput(vn_to_inode(vp))) | 83 | iput(vp)) |
92 | #else | 84 | #else |
93 | #define VN_HOLD(vp) ((void)vn_hold(vp)) | 85 | #define VN_HOLD(vp) ((void)vn_hold(vp)) |
94 | #define VN_RELE(vp) (iput(vn_to_inode(vp))) | 86 | #define VN_RELE(vp) (iput(vp)) |
95 | #endif | 87 | #endif |
96 | 88 | ||
97 | static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) | 89 | static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) |
98 | { | 90 | { |
99 | return igrab(vn_to_inode(vp)); | 91 | return igrab(vp); |
100 | } | 92 | } |
101 | 93 | ||
102 | /* | 94 | /* |
@@ -104,7 +96,7 @@ static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) | |||
104 | */ | 96 | */ |
105 | static inline int VN_BAD(bhv_vnode_t *vp) | 97 | static inline int VN_BAD(bhv_vnode_t *vp) |
106 | { | 98 | { |
107 | return is_bad_inode(vn_to_inode(vp)); | 99 | return is_bad_inode(vp); |
108 | } | 100 | } |
109 | 101 | ||
110 | /* | 102 | /* |
@@ -129,9 +121,9 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) | |||
129 | /* | 121 | /* |
130 | * Some useful predicates. | 122 | * Some useful predicates. |
131 | */ | 123 | */ |
132 | #define VN_MAPPED(vp) mapping_mapped(vn_to_inode(vp)->i_mapping) | 124 | #define VN_MAPPED(vp) mapping_mapped(vp->i_mapping) |
133 | #define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages) | 125 | #define VN_CACHED(vp) (vp->i_mapping->nrpages) |
134 | #define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \ | 126 | #define VN_DIRTY(vp) mapping_tagged(vp->i_mapping, \ |
135 | PAGECACHE_TAG_DIRTY) | 127 | PAGECACHE_TAG_DIRTY) |
136 | 128 | ||
137 | 129 | ||