aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-08-13 02:22:40 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:22:40 -0400
commit5ec7f8c7d14a3ea6bf920b3350f5c5d3527cb837 (patch)
tree3fa7d041b51027af39800ebccef63fb12af94f9d /fs
parentdf80c933f9eb01a7af3812bbe437e38205386304 (diff)
[XFS] kill bhv_vnode_t
All remaining bhv_vnode_t instance are in code that's more or less Linux specific. (Well, for xfs_acl.c that could be argued, but that code is on the removal list, too). So just do an s/bhv_vnode_t/struct inode/ over the whole tree. We can clean up variable naming and some useless helpers later. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31781a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_super.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h14
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c2
-rw-r--r--fs/xfs/xfs_acl.c30
-rw-r--r--fs/xfs/xfs_acl.h14
-rw-r--r--fs/xfs/xfs_inode.c2
-rw-r--r--fs/xfs/xfs_inode.h2
-rw-r--r--fs/xfs/xfs_vfsops.c2
-rw-r--r--fs/xfs/xfs_vnodeops.c2
11 files changed, 36 insertions, 38 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 1ca593fb1225..7605b071dc88 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -2038,7 +2038,7 @@ xfs_free_trace_bufs(void)
2038STATIC int __init 2038STATIC int __init
2039xfs_init_zones(void) 2039xfs_init_zones(void)
2040{ 2040{
2041 xfs_vnode_zone = kmem_zone_init_flags(sizeof(bhv_vnode_t), "xfs_vnode", 2041 xfs_vnode_zone = kmem_zone_init_flags(sizeof(struct inode), "xfs_vnode",
2042 KM_ZONE_HWALIGN | KM_ZONE_RECLAIM | 2042 KM_ZONE_HWALIGN | KM_ZONE_RECLAIM |
2043 KM_ZONE_SPREAD, 2043 KM_ZONE_SPREAD,
2044 xfs_fs_inode_init_once); 2044 xfs_fs_inode_init_once);
diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h
index b7d13da01bd6..57145fff3850 100644
--- a/fs/xfs/linux-2.6/xfs_super.h
+++ b/fs/xfs/linux-2.6/xfs_super.h
@@ -101,7 +101,7 @@ struct block_device;
101 101
102extern __uint64_t xfs_max_file_offset(unsigned int); 102extern __uint64_t xfs_max_file_offset(unsigned int);
103 103
104extern void xfs_initialize_vnode(struct xfs_mount *mp, bhv_vnode_t *vp, 104extern void xfs_initialize_vnode(struct xfs_mount *mp, struct inode *vp,
105 struct xfs_inode *ip); 105 struct xfs_inode *ip);
106 106
107extern void xfs_flush_inode(struct xfs_inode *); 107extern void xfs_flush_inode(struct xfs_inode *);
diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c
index 1c5a34f5c3c0..5cad3274db02 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.c
+++ b/fs/xfs/linux-2.6/xfs_vnode.c
@@ -90,7 +90,7 @@ vn_ioerror(
90 */ 90 */
91static inline int xfs_icount(struct xfs_inode *ip) 91static inline int xfs_icount(struct xfs_inode *ip)
92{ 92{
93 bhv_vnode_t *vp = VFS_I(ip); 93 struct inode *vp = VFS_I(ip);
94 94
95 if (vp) 95 if (vp)
96 return vn_count(vp); 96 return vn_count(vp);
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 0d7eac03bdf0..683ce16210ff 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -22,8 +22,6 @@ struct file;
22struct xfs_iomap; 22struct xfs_iomap;
23struct attrlist_cursor_kern; 23struct attrlist_cursor_kern;
24 24
25typedef struct inode bhv_vnode_t;
26
27/* 25/*
28 * Return values for xfs_inactive. A return value of 26 * Return values for xfs_inactive. A return value of
29 * VN_INACTIVE_NOCACHE implies that the file system behavior 27 * VN_INACTIVE_NOCACHE implies that the file system behavior
@@ -64,7 +62,7 @@ extern void vn_iowait(struct xfs_inode *ip);
64extern void vn_iowake(struct xfs_inode *ip); 62extern void vn_iowake(struct xfs_inode *ip);
65extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); 63extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l);
66 64
67static inline int vn_count(bhv_vnode_t *vp) 65static inline int vn_count(struct inode *vp)
68{ 66{
69 return atomic_read(&vp->i_count); 67 return atomic_read(&vp->i_count);
70} 68}
@@ -82,7 +80,7 @@ do { \
82 iput(VFS_I(ip)); \ 80 iput(VFS_I(ip)); \
83} while (0) 81} while (0)
84 82
85static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) 83static inline struct inode *vn_grab(struct inode *vp)
86{ 84{
87 return igrab(vp); 85 return igrab(vp);
88} 86}
@@ -90,7 +88,7 @@ static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp)
90/* 88/*
91 * Dealing with bad inodes 89 * Dealing with bad inodes
92 */ 90 */
93static inline int VN_BAD(bhv_vnode_t *vp) 91static inline int VN_BAD(struct inode *vp)
94{ 92{
95 return is_bad_inode(vp); 93 return is_bad_inode(vp);
96} 94}
@@ -98,18 +96,18 @@ static inline int VN_BAD(bhv_vnode_t *vp)
98/* 96/*
99 * Extracting atime values in various formats 97 * Extracting atime values in various formats
100 */ 98 */
101static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) 99static inline void vn_atime_to_bstime(struct inode *vp, xfs_bstime_t *bs_atime)
102{ 100{
103 bs_atime->tv_sec = vp->i_atime.tv_sec; 101 bs_atime->tv_sec = vp->i_atime.tv_sec;
104 bs_atime->tv_nsec = vp->i_atime.tv_nsec; 102 bs_atime->tv_nsec = vp->i_atime.tv_nsec;
105} 103}
106 104
107static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) 105static inline void vn_atime_to_timespec(struct inode *vp, struct timespec *ts)
108{ 106{
109 *ts = vp->i_atime; 107 *ts = vp->i_atime;
110} 108}
111 109
112static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) 110static inline void vn_atime_to_time_t(struct inode *vp, time_t *tt)
113{ 111{
114 *tt = vp->i_atime.tv_sec; 112 *tt = vp->i_atime.tv_sec;
115} 113}
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 132a0abb2f0b..1a3b803dfa55 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -1034,7 +1034,7 @@ xfs_qm_dqrele_all_inodes(
1034{ 1034{
1035 xfs_inode_t *ip, *topino; 1035 xfs_inode_t *ip, *topino;
1036 uint ireclaims; 1036 uint ireclaims;
1037 bhv_vnode_t *vp; 1037 struct inode *vp;
1038 boolean_t vnode_refd; 1038 boolean_t vnode_refd;
1039 1039
1040 ASSERT(mp->m_quotainfo); 1040 ASSERT(mp->m_quotainfo);
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 795c81e25250..b2f639a1416f 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -37,15 +37,15 @@
37#include <linux/capability.h> 37#include <linux/capability.h>
38#include <linux/posix_acl_xattr.h> 38#include <linux/posix_acl_xattr.h>
39 39
40STATIC int xfs_acl_setmode(bhv_vnode_t *, xfs_acl_t *, int *); 40STATIC int xfs_acl_setmode(struct inode *, xfs_acl_t *, int *);
41STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); 41STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *);
42STATIC void xfs_acl_get_endian(xfs_acl_t *); 42STATIC void xfs_acl_get_endian(xfs_acl_t *);
43STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); 43STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *);
44STATIC int xfs_acl_invalid(xfs_acl_t *); 44STATIC int xfs_acl_invalid(xfs_acl_t *);
45STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); 45STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *);
46STATIC void xfs_acl_get_attr(bhv_vnode_t *, xfs_acl_t *, int, int, int *); 46STATIC void xfs_acl_get_attr(struct inode *, xfs_acl_t *, int, int, int *);
47STATIC void xfs_acl_set_attr(bhv_vnode_t *, xfs_acl_t *, int, int *); 47STATIC void xfs_acl_set_attr(struct inode *, xfs_acl_t *, int, int *);
48STATIC int xfs_acl_allow_set(bhv_vnode_t *, int); 48STATIC int xfs_acl_allow_set(struct inode *, int);
49 49
50kmem_zone_t *xfs_acl_zone; 50kmem_zone_t *xfs_acl_zone;
51 51
@@ -55,7 +55,7 @@ kmem_zone_t *xfs_acl_zone;
55 */ 55 */
56int 56int
57xfs_acl_vhasacl_access( 57xfs_acl_vhasacl_access(
58 bhv_vnode_t *vp) 58 struct inode *vp)
59{ 59{
60 int error; 60 int error;
61 61
@@ -68,7 +68,7 @@ xfs_acl_vhasacl_access(
68 */ 68 */
69int 69int
70xfs_acl_vhasacl_default( 70xfs_acl_vhasacl_default(
71 bhv_vnode_t *vp) 71 struct inode *vp)
72{ 72{
73 int error; 73 int error;
74 74
@@ -207,7 +207,7 @@ posix_acl_xfs_to_xattr(
207 207
208int 208int
209xfs_acl_vget( 209xfs_acl_vget(
210 bhv_vnode_t *vp, 210 struct inode *vp,
211 void *acl, 211 void *acl,
212 size_t size, 212 size_t size,
213 int kind) 213 int kind)
@@ -249,7 +249,7 @@ out:
249 249
250int 250int
251xfs_acl_vremove( 251xfs_acl_vremove(
252 bhv_vnode_t *vp, 252 struct inode *vp,
253 int kind) 253 int kind)
254{ 254{
255 int error; 255 int error;
@@ -268,7 +268,7 @@ xfs_acl_vremove(
268 268
269int 269int
270xfs_acl_vset( 270xfs_acl_vset(
271 bhv_vnode_t *vp, 271 struct inode *vp,
272 void *acl, 272 void *acl,
273 size_t size, 273 size_t size,
274 int kind) 274 int kind)
@@ -357,7 +357,7 @@ xfs_acl_iaccess(
357 357
358STATIC int 358STATIC int
359xfs_acl_allow_set( 359xfs_acl_allow_set(
360 bhv_vnode_t *vp, 360 struct inode *vp,
361 int kind) 361 int kind)
362{ 362{
363 if (vp->i_flags & (S_IMMUTABLE|S_APPEND)) 363 if (vp->i_flags & (S_IMMUTABLE|S_APPEND))
@@ -560,7 +560,7 @@ xfs_acl_get_endian(
560 */ 560 */
561STATIC void 561STATIC void
562xfs_acl_get_attr( 562xfs_acl_get_attr(
563 bhv_vnode_t *vp, 563 struct inode *vp,
564 xfs_acl_t *aclp, 564 xfs_acl_t *aclp,
565 int kind, 565 int kind,
566 int flags, 566 int flags,
@@ -584,7 +584,7 @@ xfs_acl_get_attr(
584 */ 584 */
585STATIC void 585STATIC void
586xfs_acl_set_attr( 586xfs_acl_set_attr(
587 bhv_vnode_t *vp, 587 struct inode *vp,
588 xfs_acl_t *aclp, 588 xfs_acl_t *aclp,
589 int kind, 589 int kind,
590 int *error) 590 int *error)
@@ -618,7 +618,7 @@ xfs_acl_set_attr(
618 618
619int 619int
620xfs_acl_vtoacl( 620xfs_acl_vtoacl(
621 bhv_vnode_t *vp, 621 struct inode *vp,
622 xfs_acl_t *access_acl, 622 xfs_acl_t *access_acl,
623 xfs_acl_t *default_acl) 623 xfs_acl_t *default_acl)
624{ 624{
@@ -650,7 +650,7 @@ xfs_acl_vtoacl(
650 */ 650 */
651int 651int
652xfs_acl_inherit( 652xfs_acl_inherit(
653 bhv_vnode_t *vp, 653 struct inode *vp,
654 mode_t mode, 654 mode_t mode,
655 xfs_acl_t *pdaclp) 655 xfs_acl_t *pdaclp)
656{ 656{
@@ -709,7 +709,7 @@ out_error:
709 */ 709 */
710STATIC int 710STATIC int
711xfs_acl_setmode( 711xfs_acl_setmode(
712 bhv_vnode_t *vp, 712 struct inode *vp,
713 xfs_acl_t *acl, 713 xfs_acl_t *acl,
714 int *basicperms) 714 int *basicperms)
715{ 715{
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h
index 323ee94cf831..a4e293b93efa 100644
--- a/fs/xfs/xfs_acl.h
+++ b/fs/xfs/xfs_acl.h
@@ -59,14 +59,14 @@ extern struct kmem_zone *xfs_acl_zone;
59 (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) 59 (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name))
60#define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) 60#define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone)
61 61
62extern int xfs_acl_inherit(bhv_vnode_t *, mode_t mode, xfs_acl_t *); 62extern int xfs_acl_inherit(struct inode *, mode_t mode, xfs_acl_t *);
63extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); 63extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *);
64extern int xfs_acl_vtoacl(bhv_vnode_t *, xfs_acl_t *, xfs_acl_t *); 64extern int xfs_acl_vtoacl(struct inode *, xfs_acl_t *, xfs_acl_t *);
65extern int xfs_acl_vhasacl_access(bhv_vnode_t *); 65extern int xfs_acl_vhasacl_access(struct inode *);
66extern int xfs_acl_vhasacl_default(bhv_vnode_t *); 66extern int xfs_acl_vhasacl_default(struct inode *);
67extern int xfs_acl_vset(bhv_vnode_t *, void *, size_t, int); 67extern int xfs_acl_vset(struct inode *, void *, size_t, int);
68extern int xfs_acl_vget(bhv_vnode_t *, void *, size_t, int); 68extern int xfs_acl_vget(struct inode *, void *, size_t, int);
69extern int xfs_acl_vremove(bhv_vnode_t *, int); 69extern int xfs_acl_vremove(struct inode *, int);
70 70
71#define _ACL_PERM_INVALID(perm) ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE)) 71#define _ACL_PERM_INVALID(perm) ((perm) & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE))
72 72
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index efac8857ccb1..19e7a7b82703 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1046,7 +1046,7 @@ xfs_ialloc(
1046{ 1046{
1047 xfs_ino_t ino; 1047 xfs_ino_t ino;
1048 xfs_inode_t *ip; 1048 xfs_inode_t *ip;
1049 bhv_vnode_t *vp; 1049 struct inode *vp;
1050 uint flags; 1050 uint flags;
1051 int error; 1051 int error;
1052 1052
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index ec9f454b464e..571724404355 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -204,7 +204,7 @@ typedef struct xfs_inode {
204 struct xfs_inode *i_mprev; /* ptr to prev inode */ 204 struct xfs_inode *i_mprev; /* ptr to prev inode */
205 struct xfs_mount *i_mount; /* fs mount struct ptr */ 205 struct xfs_mount *i_mount; /* fs mount struct ptr */
206 struct list_head i_reclaim; /* reclaim list */ 206 struct list_head i_reclaim; /* reclaim list */
207 bhv_vnode_t *i_vnode; /* vnode backpointer */ 207 struct inode *i_vnode; /* vnode backpointer */
208 struct xfs_dquot *i_udquot; /* user dquot */ 208 struct xfs_dquot *i_udquot; /* user dquot */
209 struct xfs_dquot *i_gdquot; /* group dquot */ 209 struct xfs_dquot *i_gdquot; /* group dquot */
210 210
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 974d3c0b8b6c..439dd3939dda 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -283,7 +283,7 @@ xfs_sync_inodes(
283 int *bypassed) 283 int *bypassed)
284{ 284{
285 xfs_inode_t *ip = NULL; 285 xfs_inode_t *ip = NULL;
286 bhv_vnode_t *vp = NULL; 286 struct inode *vp = NULL;
287 int error; 287 int error;
288 int last_error; 288 int last_error;
289 uint64_t fflag; 289 uint64_t fflag;
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 21da312dd8b2..7b967c096d03 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -2850,7 +2850,7 @@ xfs_finish_reclaim(
2850 int sync_mode) 2850 int sync_mode)
2851{ 2851{
2852 xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); 2852 xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino);
2853 bhv_vnode_t *vp = VFS_I(ip); 2853 struct inode *vp = VFS_I(ip);
2854 2854
2855 if (vp && VN_BAD(vp)) 2855 if (vp && VN_BAD(vp))
2856 goto reclaim; 2856 goto reclaim;