aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c14
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h24
-rw-r--r--fs/xfs/xfs_vnodeops.c4
5 files changed, 18 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index a9cd6e410525..1b8dfdcac0a5 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -180,7 +180,7 @@
180#define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL) 180#define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL)
181#define xfs_stack_trace() dump_stack() 181#define xfs_stack_trace() dump_stack()
182#define xfs_itruncate_data(ip, off) \ 182#define xfs_itruncate_data(ip, off) \
183 (-vmtruncate(vn_to_inode(VFS_I(ip)), (off))) 183 (-vmtruncate(VFS_I(ip), (off)))
184 184
185 185
186/* Move the kernel do_div definition off to one side */ 186/* Move the kernel do_div definition off to one side */
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 184ef14856af..71ac3a6162e9 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -613,10 +613,9 @@ xfs_set_inodeops(
613STATIC_INLINE void 613STATIC_INLINE void
614xfs_revalidate_inode( 614xfs_revalidate_inode(
615 xfs_mount_t *mp, 615 xfs_mount_t *mp,
616 bhv_vnode_t *vp, 616 struct inode *inode,
617 xfs_inode_t *ip) 617 xfs_inode_t *ip)
618{ 618{
619 struct inode *inode = vn_to_inode(vp);
620 619
621 inode->i_mode = ip->i_d.di_mode; 620 inode->i_mode = ip->i_d.di_mode;
622 inode->i_nlink = ip->i_d.di_nlink; 621 inode->i_nlink = ip->i_d.di_nlink;
@@ -665,13 +664,12 @@ xfs_revalidate_inode(
665void 664void
666xfs_initialize_vnode( 665xfs_initialize_vnode(
667 struct xfs_mount *mp, 666 struct xfs_mount *mp,
668 bhv_vnode_t *vp, 667 struct inode *inode,
669 struct xfs_inode *ip) 668 struct xfs_inode *ip)
670{ 669{
671 struct inode *inode = vn_to_inode(vp);
672 670
673 if (!ip->i_vnode) { 671 if (!ip->i_vnode) {
674 ip->i_vnode = vp; 672 ip->i_vnode = inode;
675 inode->i_private = ip; 673 inode->i_private = ip;
676 } 674 }
677 675
@@ -683,7 +681,7 @@ xfs_initialize_vnode(
683 * finish our work. 681 * finish our work.
684 */ 682 */
685 if (ip->i_d.di_mode != 0 && (inode->i_state & I_NEW)) { 683 if (ip->i_d.di_mode != 0 && (inode->i_state & I_NEW)) {
686 xfs_revalidate_inode(mp, vp, ip); 684 xfs_revalidate_inode(mp, inode, ip);
687 xfs_set_inodeops(inode); 685 xfs_set_inodeops(inode);
688 686
689 xfs_iflags_clear(ip, XFS_INEW); 687 xfs_iflags_clear(ip, XFS_INEW);
@@ -987,7 +985,7 @@ xfs_fs_alloc_inode(
987 vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP); 985 vp = kmem_zone_alloc(xfs_vnode_zone, KM_SLEEP);
988 if (unlikely(!vp)) 986 if (unlikely(!vp))
989 return NULL; 987 return NULL;
990 return vn_to_inode(vp); 988 return vp;
991} 989}
992 990
993STATIC void 991STATIC void
@@ -1001,7 +999,7 @@ STATIC void
1001xfs_fs_inode_init_once( 999xfs_fs_inode_init_once(
1002 void *vnode) 1000 void *vnode)
1003{ 1001{
1004 inode_init_once(vn_to_inode((bhv_vnode_t *)vnode)); 1002 inode_init_once((struct inode *)vnode);
1005} 1003}
1006 1004
1007/* 1005/*
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index 1e39d04c86c4..4af972b0166c 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -94,7 +94,7 @@ vn_hold(
94 94
95 XFS_STATS_INC(vn_hold); 95 XFS_STATS_INC(vn_hold);
96 96
97 inode = igrab(vn_to_inode(vp)); 97 inode = igrab(vp);
98 ASSERT(inode); 98 ASSERT(inode);
99 99
100 return vp; 100 return vp;
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;
25typedef struct inode bhv_vnode_t; 25typedef struct inode bhv_vnode_t;
26 26
27/* 27/*
28 * Vnode to Linux inode mapping.
29 */
30static 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
75static inline int vn_count(bhv_vnode_t *vp) 67static 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
97static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) 89static 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 */
105static inline int VN_BAD(bhv_vnode_t *vp) 97static 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
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 35a053fd161b..c5dc7ea85260 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -714,7 +714,7 @@ xfs_fsync(
714 return XFS_ERROR(EIO); 714 return XFS_ERROR(EIO);
715 715
716 /* capture size updates in I/O completion before writing the inode. */ 716 /* capture size updates in I/O completion before writing the inode. */
717 error = filemap_fdatawait(vn_to_inode(VFS_I(ip))->i_mapping); 717 error = filemap_fdatawait(VFS_I(ip)->i_mapping);
718 if (error) 718 if (error)
719 return XFS_ERROR(error); 719 return XFS_ERROR(error);
720 720
@@ -2917,7 +2917,7 @@ xfs_reclaim(
2917 XFS_MOUNT_ILOCK(mp); 2917 XFS_MOUNT_ILOCK(mp);
2918 spin_lock(&ip->i_flags_lock); 2918 spin_lock(&ip->i_flags_lock);
2919 __xfs_iflags_set(ip, XFS_IRECLAIMABLE); 2919 __xfs_iflags_set(ip, XFS_IRECLAIMABLE);
2920 vn_to_inode(vp)->i_private = NULL; 2920 vp->i_private = NULL;
2921 ip->i_vnode = NULL; 2921 ip->i_vnode = NULL;
2922 spin_unlock(&ip->i_flags_lock); 2922 spin_unlock(&ip->i_flags_lock);
2923 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); 2923 list_add_tail(&ip->i_reclaim, &mp->m_del_inodes);