提交 a19d033c 编写于 作者: C Christoph Hellwig 提交者: Lachlan McIlroy

[XFS] Remove vn_from_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:31760a
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
上级 39dab9d7
......@@ -994,7 +994,7 @@ STATIC void
xfs_fs_destroy_inode(
struct inode *inode)
{
kmem_zone_free(xfs_vnode_zone, vn_from_inode(inode));
kmem_zone_free(xfs_vnode_zone, inode);
}
STATIC void
......
......@@ -27,10 +27,6 @@ typedef struct inode bhv_vnode_t;
/*
* Vnode to Linux inode mapping.
*/
static inline bhv_vnode_t *vn_from_inode(struct inode *inode)
{
return inode;
}
static inline struct inode *vn_to_inode(bhv_vnode_t *vnode)
{
return vnode;
......@@ -100,8 +96,7 @@ extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
{
struct inode *inode = igrab(vn_to_inode(vp));
return inode ? vn_from_inode(inode) : NULL;
return igrab(vn_to_inode(vp));
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册