diff options
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 17a04b6321ed..4a5e48c8ded2 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -263,6 +263,25 @@ typedef struct xfs_inode { | |||
263 | #define XFS_ISIZE(ip) (((ip)->i_d.di_mode & S_IFMT) == S_IFREG) ? \ | 263 | #define XFS_ISIZE(ip) (((ip)->i_d.di_mode & S_IFMT) == S_IFREG) ? \ |
264 | (ip)->i_size : (ip)->i_d.di_size; | 264 | (ip)->i_size : (ip)->i_d.di_size; |
265 | 265 | ||
266 | /* Convert from vfs inode to xfs inode */ | ||
267 | static inline struct xfs_inode *XFS_I(struct inode *inode) | ||
268 | { | ||
269 | return (struct xfs_inode *)inode->i_private; | ||
270 | } | ||
271 | |||
272 | static inline struct xfs_inode *xfs_vtoi(bhv_vnode_t *vp) | ||
273 | { | ||
274 | return XFS_I((struct inode *)vp); | ||
275 | } | ||
276 | |||
277 | /* convert from xfs inode to vfs inode */ | ||
278 | static inline struct inode *VFS_I(struct xfs_inode *ip) | ||
279 | { | ||
280 | return (struct inode *)ip->i_vnode; | ||
281 | } | ||
282 | #define XFS_ITOV(ip) VFS_I(ip) | ||
283 | #define XFS_ITOV_NULL(ip) VFS_I(ip) | ||
284 | |||
266 | /* | 285 | /* |
267 | * i_flags helper functions | 286 | * i_flags helper functions |
268 | */ | 287 | */ |
@@ -439,9 +458,6 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) | |||
439 | #define XFS_ITRUNC_DEFINITE 0x1 | 458 | #define XFS_ITRUNC_DEFINITE 0x1 |
440 | #define XFS_ITRUNC_MAYBE 0x2 | 459 | #define XFS_ITRUNC_MAYBE 0x2 |
441 | 460 | ||
442 | #define XFS_ITOV(ip) ((ip)->i_vnode) | ||
443 | #define XFS_ITOV_NULL(ip) ((ip)->i_vnode) | ||
444 | |||
445 | /* | 461 | /* |
446 | * For multiple groups support: if S_ISGID bit is set in the parent | 462 | * For multiple groups support: if S_ISGID bit is set in the parent |
447 | * directory, group of new file is set to that of the parent, and | 463 | * directory, group of new file is set to that of the parent, and |