diff options
author | Christoph Hellwig <hch@sgi.com> | 2006-01-11 04:58:44 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-11 04:58:44 -0500 |
commit | 75e17b3caf29b262000dc7348f1be9a7d5403463 (patch) | |
tree | 4bdf782dd3624fd23832b035ebbdbb4daca7dd94 /fs/xfs/linux-2.6/xfs_iops.c | |
parent | 204ab25f36fbd44a24458c0227cf2629c8caf00d (diff) |
[XFS] add helper to get xfs_inode from vnode
SGI-PV: 947206
SGI-Modid: xfs-linux-melb:xfs-kern:203960a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index fe5e9894fdee..d388d14efe3e 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -59,6 +59,22 @@ | |||
59 | (S_ISDIR(inode->i_mode) && inode->i_sb->s_flags & MS_NODIRATIME)) | 59 | (S_ISDIR(inode->i_mode) && inode->i_sb->s_flags & MS_NODIRATIME)) |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * Get a XFS inode from a given vnode. | ||
63 | */ | ||
64 | xfs_inode_t * | ||
65 | xfs_vtoi( | ||
66 | struct vnode *vp) | ||
67 | { | ||
68 | bhv_desc_t *bdp; | ||
69 | |||
70 | bdp = bhv_lookup_range(VN_BHV_HEAD(vp), | ||
71 | VNODE_POSITION_XFS, VNODE_POSITION_XFS); | ||
72 | if (unlikely(bdp == NULL)) | ||
73 | return NULL; | ||
74 | return XFS_BHVTOI(bdp); | ||
75 | } | ||
76 | |||
77 | /* | ||
62 | * Bring the atime in the XFS inode uptodate. | 78 | * Bring the atime in the XFS inode uptodate. |
63 | * Used before logging the inode to disk or when the Linux inode goes away. | 79 | * Used before logging the inode to disk or when the Linux inode goes away. |
64 | */ | 80 | */ |