From cd6010c0e641b8cfabae2ad9c3da7c60939957b7 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 28 Sep 2006 10:58:52 +1000 Subject: [PATCH] --- yaml --- r: 37135 b: refs/heads/master c: fe48cae9ed979d2ac14080c837d793c4f6bfaa82 h: refs/heads/master i: 37133: dfb7e51bad7ec08480f42ceb0ecb908c28f90297 37131: 22e8dd0ca72837b02d27ac967368f548f9eb4d86 37127: 027cd5ecb4cc503ba2b0d848e0712a03bf4a553b 37119: 59353a1f87177b64b15b107891ed8099463aef12 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_vnode.h | 2 -- trunk/fs/xfs/xfs_behavior.c | 20 -------------------- trunk/fs/xfs/xfs_behavior.h | 2 -- trunk/fs/xfs/xfs_mount.h | 3 ++- 5 files changed, 3 insertions(+), 26 deletions(-) diff --git a/[refs] b/[refs] index fe86468ecfea..0935bd7c8106 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1121b219bf3fe6d1bd1d1f7618cc5e0c409fabb4 +refs/heads/master: fe48cae9ed979d2ac14080c837d793c4f6bfaa82 diff --git a/trunk/fs/xfs/linux-2.6/xfs_vnode.h b/trunk/fs/xfs/linux-2.6/xfs_vnode.h index c42b3221b20c..515f5fdea57a 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_vnode.h +++ b/trunk/fs/xfs/linux-2.6/xfs_vnode.h @@ -85,8 +85,6 @@ typedef enum { #define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) #define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) #define vn_bhv_remove(bhp,bdp) bhv_remove(bhp,bdp) -#define vn_bhv_lookup(bhp,ops) bhv_lookup(bhp,ops) -#define vn_bhv_lookup_unlocked(bhp,ops) bhv_lookup_unlocked(bhp,ops) /* * Vnode to Linux inode mapping. diff --git a/trunk/fs/xfs/xfs_behavior.c b/trunk/fs/xfs/xfs_behavior.c index f4fe3715a803..0dc17219d412 100644 --- a/trunk/fs/xfs/xfs_behavior.c +++ b/trunk/fs/xfs/xfs_behavior.c @@ -109,26 +109,6 @@ bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp) prev->bd_next = bdp->bd_next; /* remove from after prev */ } -/* - * Look for a specific ops vector on the specified behavior chain. - * Return the associated behavior descriptor. Or NULL, if not found. - */ -bhv_desc_t * -bhv_lookup(bhv_head_t *bhp, void *ops) -{ - bhv_desc_t *curdesc; - - for (curdesc = bhp->bh_first; - curdesc != NULL; - curdesc = curdesc->bd_next) { - - if (curdesc->bd_ops == ops) - return curdesc; - } - - return NULL; -} - /* * Looks for the first behavior within a specified range of positions. * Return the associated behavior descriptor. Or NULL, if none found. diff --git a/trunk/fs/xfs/xfs_behavior.h b/trunk/fs/xfs/xfs_behavior.h index 6e6e56fb352d..e7ca1fed955a 100644 --- a/trunk/fs/xfs/xfs_behavior.h +++ b/trunk/fs/xfs/xfs_behavior.h @@ -176,12 +176,10 @@ extern void bhv_insert_initial(bhv_head_t *, bhv_desc_t *); * Behavior module prototypes. */ extern void bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp); -extern bhv_desc_t * bhv_lookup(bhv_head_t *bhp, void *ops); extern bhv_desc_t * bhv_lookup_range(bhv_head_t *bhp, int low, int high); extern bhv_desc_t * bhv_base(bhv_head_t *bhp); /* No bhv locking on Linux */ -#define bhv_lookup_unlocked bhv_lookup #define bhv_base_unlocked bhv_base #endif /* __XFS_BEHAVIOR_H__ */ diff --git a/trunk/fs/xfs/xfs_mount.h b/trunk/fs/xfs/xfs_mount.h index b2bd4be4200a..3091c44f29ec 100644 --- a/trunk/fs/xfs/xfs_mount.h +++ b/trunk/fs/xfs/xfs_mount.h @@ -541,7 +541,8 @@ static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp) #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) { - return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); + return XFS_BHVTOM(bhv_lookup_range(VFS_BHVHEAD(vfs), + VFS_POSITION_XFS, VFS_POSITION_XFS)); } #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d)