aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-28 21:53:12 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:40:24 -0400
commit0a74cd1964501fdb577176f14ed3d02b8e148127 (patch)
treeec4aa3dff46b141cd60734bb6c8a0c6b6a2e7111 /fs/xfs/linux-2.6
parent2aeaa258c0527026228c43148ec6dffdc56bea1c (diff)
[XFS] kill struct bhv_vnode
Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vnode_t as a typedef for struct inode for the time being until all the fallout is cleaned up. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29500a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r--fs/xfs/linux-2.6/xfs_iops.c7
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.h3
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.c8
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.h18
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h48
6 files changed, 40 insertions, 46 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 98d5a7e13bd5..59ba1dc65fa6 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -65,9 +65,8 @@ xfs_synchronize_atime(
65 65
66 vp = XFS_ITOV_NULL(ip); 66 vp = XFS_ITOV_NULL(ip);
67 if (vp) { 67 if (vp) {
68 struct inode *inode = &vp->v_inode; 68 ip->i_d.di_atime.t_sec = (__int32_t)vp->i_atime.tv_sec;
69 ip->i_d.di_atime.t_sec = (__int32_t)inode->i_atime.tv_sec; 69 ip->i_d.di_atime.t_nsec = (__int32_t)vp->i_atime.tv_nsec;
70 ip->i_d.di_atime.t_nsec = (__int32_t)inode->i_atime.tv_nsec;
71 } 70 }
72} 71}
73 72
@@ -327,7 +326,7 @@ xfs_vn_mknod(
327 if (!error) { 326 if (!error) {
328 error = _ACL_INHERIT(vp, &vattr, default_acl); 327 error = _ACL_INHERIT(vp, &vattr, default_acl);
329 if (!error) 328 if (!error)
330 xfs_iflags_set(XFS_I(&vp->v_inode), XFS_IMODIFIED); 329 xfs_iflags_set(XFS_I(vp), XFS_IMODIFIED);
331 else 330 else
332 xfs_cleanup_inode(dir, vp, dentry, mode); 331 xfs_cleanup_inode(dir, vp, dentry, mode);
333 } 332 }
diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h
index fa7cefa86a82..4cd85c3360f5 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.h
+++ b/fs/xfs/linux-2.6/xfs_lrw.h
@@ -19,7 +19,6 @@
19#define __XFS_LRW_H__ 19#define __XFS_LRW_H__
20 20
21struct bhv_desc; 21struct bhv_desc;
22struct bhv_vnode;
23struct xfs_mount; 22struct xfs_mount;
24struct xfs_iocore; 23struct xfs_iocore;
25struct xfs_inode; 24struct xfs_inode;
@@ -75,7 +74,7 @@ extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
75extern int xfs_bdstrat_cb(struct xfs_buf *); 74extern int xfs_bdstrat_cb(struct xfs_buf *);
76extern int xfs_dev_is_read_only(struct xfs_mount *, char *); 75extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
77 76
78extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t, 77extern int xfs_zero_eof(struct inode *, struct xfs_iocore *, xfs_off_t,
79 xfs_fsize_t); 78 xfs_fsize_t);
80 79
81#endif /* __XFS_LRW_H__ */ 80#endif /* __XFS_LRW_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index bb0c4a932fd7..24073f8a292b 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -781,7 +781,7 @@ xfs_fs_fill_super(
781 void *data, 781 void *data,
782 int silent) 782 int silent)
783{ 783{
784 struct bhv_vnode *rootvp; 784 struct inode *rootvp;
785 struct bhv_vfs *vfsp = vfs_allocate(sb); 785 struct bhv_vfs *vfsp = vfs_allocate(sb);
786 struct xfs_mount_args *args = xfs_args_allocate(sb, silent); 786 struct xfs_mount_args *args = xfs_args_allocate(sb, silent);
787 struct kstatfs statvfs; 787 struct kstatfs statvfs;
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
index 0dc87cd20229..c5ec272cdf22 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.c
+++ b/fs/xfs/linux-2.6/xfs_vfs.c
@@ -103,7 +103,7 @@ vfs_mntupdate(
103int 103int
104vfs_root( 104vfs_root(
105 struct bhv_desc *bdp, 105 struct bhv_desc *bdp,
106 struct bhv_vnode **vpp) 106 bhv_vnode_t **vpp)
107{ 107{
108 struct bhv_desc *next = bdp; 108 struct bhv_desc *next = bdp;
109 109
@@ -117,7 +117,7 @@ int
117vfs_statvfs( 117vfs_statvfs(
118 struct bhv_desc *bdp, 118 struct bhv_desc *bdp,
119 bhv_statvfs_t *statp, 119 bhv_statvfs_t *statp,
120 struct bhv_vnode *vp) 120 bhv_vnode_t *vp)
121{ 121{
122 struct bhv_desc *next = bdp; 122 struct bhv_desc *next = bdp;
123 123
@@ -144,7 +144,7 @@ vfs_sync(
144int 144int
145vfs_vget( 145vfs_vget(
146 struct bhv_desc *bdp, 146 struct bhv_desc *bdp,
147 struct bhv_vnode **vpp, 147 bhv_vnode_t **vpp,
148 struct fid *fidp) 148 struct fid *fidp)
149{ 149{
150 struct bhv_desc *next = bdp; 150 struct bhv_desc *next = bdp;
@@ -186,7 +186,7 @@ vfs_quotactl(
186void 186void
187vfs_init_vnode( 187vfs_init_vnode(
188 struct bhv_desc *bdp, 188 struct bhv_desc *bdp,
189 struct bhv_vnode *vp, 189 bhv_vnode_t *vp,
190 struct xfs_inode *ip, 190 struct xfs_inode *ip,
191 int unlock) 191 int unlock)
192{ 192{
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index 75994e1318bc..768ffa96e62b 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -22,7 +22,7 @@
22#include "xfs_fs.h" 22#include "xfs_fs.h"
23 23
24struct bhv_vfs; 24struct bhv_vfs;
25struct bhv_vnode; 25struct inode;
26 26
27struct fid; 27struct fid;
28struct cred; 28struct cred;
@@ -124,15 +124,15 @@ typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *);
124typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); 124typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *);
125typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, 125typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *,
126 struct xfs_mount_args *); 126 struct xfs_mount_args *);
127typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); 127typedef int (*vfs_root_t)(bhv_desc_t *, struct inode **);
128typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *, 128typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *,
129 struct bhv_vnode *); 129 struct inode *);
130typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); 130typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *);
131typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); 131typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *);
132typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); 132typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t);
133typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); 133typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t);
134typedef void (*vfs_init_vnode_t)(bhv_desc_t *, 134typedef void (*vfs_init_vnode_t)(bhv_desc_t *,
135 struct bhv_vnode *, struct xfs_inode *, int); 135 struct inode *, struct xfs_inode *, int);
136typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); 136typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int);
137typedef void (*vfs_freeze_t)(bhv_desc_t *); 137typedef void (*vfs_freeze_t)(bhv_desc_t *);
138 138
@@ -196,13 +196,13 @@ extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int);
196extern int vfs_showargs(bhv_desc_t *, struct seq_file *); 196extern int vfs_showargs(bhv_desc_t *, struct seq_file *);
197extern int vfs_unmount(bhv_desc_t *, int, struct cred *); 197extern int vfs_unmount(bhv_desc_t *, int, struct cred *);
198extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); 198extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *);
199extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); 199extern int vfs_root(bhv_desc_t *, struct inode **);
200extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *); 200extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *);
201extern int vfs_sync(bhv_desc_t *, int, struct cred *); 201extern int vfs_sync(bhv_desc_t *, int, struct cred *);
202extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); 202extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *);
203extern int vfs_dmapiops(bhv_desc_t *, caddr_t); 203extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
204extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); 204extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t);
205extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int); 205extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int);
206extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); 206extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
207extern void vfs_freeze(bhv_desc_t *); 207extern void vfs_freeze(bhv_desc_t *);
208 208
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index a5c14a8d546a..4682c617f3a4 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -26,28 +26,24 @@ struct attrlist_cursor_kern;
26 26
27typedef struct dentry bhv_vname_t; 27typedef struct dentry bhv_vname_t;
28typedef __u64 bhv_vnumber_t; 28typedef __u64 bhv_vnumber_t;
29typedef struct inode bhv_vnode_t;
29 30
30typedef struct bhv_vnode { 31#define VN_ISLNK(vp) S_ISLNK((vp)->i_mode)
31 struct inode v_inode; /* Linux inode */ 32#define VN_ISREG(vp) S_ISREG((vp)->i_mode)
32 /* inode MUST be last */ 33#define VN_ISDIR(vp) S_ISDIR((vp)->i_mode)
33} bhv_vnode_t; 34#define VN_ISCHR(vp) S_ISCHR((vp)->i_mode)
34 35#define VN_ISBLK(vp) S_ISBLK((vp)->i_mode)
35#define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode)
36#define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode)
37#define VN_ISDIR(vp) S_ISDIR((vp)->v_inode.i_mode)
38#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode)
39#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode)
40 36
41/* 37/*
42 * Vnode to Linux inode mapping. 38 * Vnode to Linux inode mapping.
43 */ 39 */
44static inline struct bhv_vnode *vn_from_inode(struct inode *inode) 40static inline bhv_vnode_t *vn_from_inode(struct inode *inode)
45{ 41{
46 return container_of(inode, bhv_vnode_t, v_inode); 42 return inode;
47} 43}
48static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) 44static inline struct inode *vn_to_inode(bhv_vnode_t *vnode)
49{ 45{
50 return &vnode->v_inode; 46 return vnode;
51} 47}
52 48
53/* 49/*
@@ -193,9 +189,9 @@ typedef struct bhv_vattr {
193 189
194extern void vn_init(void); 190extern void vn_init(void);
195extern bhv_vnode_t *vn_initialize(struct inode *); 191extern bhv_vnode_t *vn_initialize(struct inode *);
196extern int vn_revalidate(struct bhv_vnode *); 192extern int vn_revalidate(bhv_vnode_t *);
197extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *); 193extern int __vn_revalidate(bhv_vnode_t *, bhv_vattr_t *);
198extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *); 194extern void vn_revalidate_core(bhv_vnode_t *, bhv_vattr_t *);
199 195
200/* 196/*
201 * Yeah, these don't take vnode anymore at all, all this should be 197 * Yeah, these don't take vnode anymore at all, all this should be
@@ -205,7 +201,7 @@ extern void vn_iowait(struct xfs_inode *ip);
205extern void vn_iowake(struct xfs_inode *ip); 201extern void vn_iowake(struct xfs_inode *ip);
206extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); 202extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
207 203
208static inline int vn_count(struct bhv_vnode *vp) 204static inline int vn_count(bhv_vnode_t *vp)
209{ 205{
210 return atomic_read(&vn_to_inode(vp)->i_count); 206 return atomic_read(&vn_to_inode(vp)->i_count);
211} 207}
@@ -213,7 +209,7 @@ static inline int vn_count(struct bhv_vnode *vp)
213/* 209/*
214 * Vnode reference counting functions (and macros for compatibility). 210 * Vnode reference counting functions (and macros for compatibility).
215 */ 211 */
216extern bhv_vnode_t *vn_hold(struct bhv_vnode *); 212extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
217 213
218#if defined(XFS_VNODE_TRACE) 214#if defined(XFS_VNODE_TRACE)
219#define VN_HOLD(vp) \ 215#define VN_HOLD(vp) \
@@ -227,7 +223,7 @@ extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
227#define VN_RELE(vp) (iput(vn_to_inode(vp))) 223#define VN_RELE(vp) (iput(vn_to_inode(vp)))
228#endif 224#endif
229 225
230static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) 226static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
231{ 227{
232 struct inode *inode = igrab(vn_to_inode(vp)); 228 struct inode *inode = igrab(vn_to_inode(vp));
233 return inode ? vn_from_inode(inode) : NULL; 229 return inode ? vn_from_inode(inode) : NULL;
@@ -243,12 +239,12 @@ static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp)
243/* 239/*
244 * Dealing with bad inodes 240 * Dealing with bad inodes
245 */ 241 */
246static inline void vn_mark_bad(struct bhv_vnode *vp) 242static inline void vn_mark_bad(bhv_vnode_t *vp)
247{ 243{
248 make_bad_inode(vn_to_inode(vp)); 244 make_bad_inode(vn_to_inode(vp));
249} 245}
250 246
251static inline int VN_BAD(struct bhv_vnode *vp) 247static inline int VN_BAD(bhv_vnode_t *vp)
252{ 248{
253 return is_bad_inode(vn_to_inode(vp)); 249 return is_bad_inode(vn_to_inode(vp));
254} 250}
@@ -258,18 +254,18 @@ static inline int VN_BAD(struct bhv_vnode *vp)
258 */ 254 */
259static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) 255static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime)
260{ 256{
261 bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; 257 bs_atime->tv_sec = vp->i_atime.tv_sec;
262 bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; 258 bs_atime->tv_nsec = vp->i_atime.tv_nsec;
263} 259}
264 260
265static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) 261static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts)
266{ 262{
267 *ts = vp->v_inode.i_atime; 263 *ts = vp->i_atime;
268} 264}
269 265
270static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) 266static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
271{ 267{
272 *tt = vp->v_inode.i_atime.tv_sec; 268 *tt = vp->i_atime.tv_sec;
273} 269}
274 270
275/* 271/*