aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-09-27 20:58:52 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 20:58:52 -0400
commitfe48cae9ed979d2ac14080c837d793c4f6bfaa82 (patch)
tree8e130619553b5415952b2184a83c6fabc7c062f8 /fs/xfs
parent1121b219bf3fe6d1bd1d1f7618cc5e0c409fabb4 (diff)
[XFS] remove bhv_lookup, _range version works aswell and has more useful
semantics. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26563a Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h2
-rw-r--r--fs/xfs/xfs_behavior.c20
-rw-r--r--fs/xfs/xfs_behavior.h2
-rw-r--r--fs/xfs/xfs_mount.h3
4 files changed, 2 insertions, 25 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index c42b3221b20c..515f5fdea57a 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -85,8 +85,6 @@ typedef enum {
85#define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) 85#define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh)))
86#define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) 86#define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name)
87#define vn_bhv_remove(bhp,bdp) bhv_remove(bhp,bdp) 87#define vn_bhv_remove(bhp,bdp) bhv_remove(bhp,bdp)
88#define vn_bhv_lookup(bhp,ops) bhv_lookup(bhp,ops)
89#define vn_bhv_lookup_unlocked(bhp,ops) bhv_lookup_unlocked(bhp,ops)
90 88
91/* 89/*
92 * Vnode to Linux inode mapping. 90 * Vnode to Linux inode mapping.
diff --git a/fs/xfs/xfs_behavior.c b/fs/xfs/xfs_behavior.c
index f4fe3715a803..0dc17219d412 100644
--- a/fs/xfs/xfs_behavior.c
+++ b/fs/xfs/xfs_behavior.c
@@ -110,26 +110,6 @@ bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp)
110} 110}
111 111
112/* 112/*
113 * Look for a specific ops vector on the specified behavior chain.
114 * Return the associated behavior descriptor. Or NULL, if not found.
115 */
116bhv_desc_t *
117bhv_lookup(bhv_head_t *bhp, void *ops)
118{
119 bhv_desc_t *curdesc;
120
121 for (curdesc = bhp->bh_first;
122 curdesc != NULL;
123 curdesc = curdesc->bd_next) {
124
125 if (curdesc->bd_ops == ops)
126 return curdesc;
127 }
128
129 return NULL;
130}
131
132/*
133 * Looks for the first behavior within a specified range of positions. 113 * Looks for the first behavior within a specified range of positions.
134 * Return the associated behavior descriptor. Or NULL, if none found. 114 * Return the associated behavior descriptor. Or NULL, if none found.
135 */ 115 */
diff --git a/fs/xfs/xfs_behavior.h b/fs/xfs/xfs_behavior.h
index 6e6e56fb352d..e7ca1fed955a 100644
--- a/fs/xfs/xfs_behavior.h
+++ b/fs/xfs/xfs_behavior.h
@@ -176,12 +176,10 @@ extern void bhv_insert_initial(bhv_head_t *, bhv_desc_t *);
176 * Behavior module prototypes. 176 * Behavior module prototypes.
177 */ 177 */
178extern void bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp); 178extern void bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp);
179extern bhv_desc_t * bhv_lookup(bhv_head_t *bhp, void *ops);
180extern bhv_desc_t * bhv_lookup_range(bhv_head_t *bhp, int low, int high); 179extern bhv_desc_t * bhv_lookup_range(bhv_head_t *bhp, int low, int high);
181extern bhv_desc_t * bhv_base(bhv_head_t *bhp); 180extern bhv_desc_t * bhv_base(bhv_head_t *bhp);
182 181
183/* No bhv locking on Linux */ 182/* No bhv locking on Linux */
184#define bhv_lookup_unlocked bhv_lookup
185#define bhv_base_unlocked bhv_base 183#define bhv_base_unlocked bhv_base
186 184
187#endif /* __XFS_BEHAVIOR_H__ */ 185#endif /* __XFS_BEHAVIOR_H__ */
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index b2bd4be4200a..3091c44f29ec 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -541,7 +541,8 @@ static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp)
541#define XFS_VFSTOM(vfs) xfs_vfstom(vfs) 541#define XFS_VFSTOM(vfs) xfs_vfstom(vfs)
542static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) 542static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs)
543{ 543{
544 return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); 544 return XFS_BHVTOM(bhv_lookup_range(VFS_BHVHEAD(vfs),
545 VFS_POSITION_XFS, VFS_POSITION_XFS));
545} 546}
546 547
547#define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) 548#define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d)