
Thinking about it, this is probably a better patch.  There's only one
implementation of vop_access, so inline it into linvfs_permission.

 - Remove VOP_ACCESS
 - Remove vop_access
 - Inline xfs_access into linvfs_permission

Index: fs/xfs/xfs_vnodeops.c
===================================================================
RCS file: /var/cvs/linux-2.6/fs/xfs/xfs_vnodeops.c,v
retrieving revision 1.2
diff -u -p -r1.2 xfs_vnodeops.c
--- fs/xfs/xfs_vnodeops.c	12 Aug 2003 19:11:19 -0000	1.2
+++ fs/xfs/xfs_vnodeops.c	16 Aug 2003 22:34:57 -0000
@@ -928,30 +928,6 @@ xfs_setattr(
 
 
 /*
- * xfs_access
- * Null conversion from vnode mode bits to inode mode bits, as in efs.
- */
-STATIC int
-xfs_access(
-	bhv_desc_t	*bdp,
-	int		mode,
-	cred_t		*credp)
-{
-	xfs_inode_t	*ip;
-	int		error;
-
-	vn_trace_entry(BHV_TO_VNODE(bdp), __FUNCTION__,
-					       (inst_t *)__return_address);
-
-	ip = XFS_BHVTOI(bdp);
-	xfs_ilock(ip, XFS_ILOCK_SHARED);
-	error = xfs_iaccess(ip, mode, credp);
-	xfs_iunlock(ip, XFS_ILOCK_SHARED);
-	return error;
-}
-
-
-/*
  * xfs_readlink
  *
  */
@@ -4731,7 +4707,6 @@ vnodeops_t xfs_vnodeops = {
 	.vop_ioctl		= xfs_ioctl,
 	.vop_getattr		= xfs_getattr,
 	.vop_setattr		= xfs_setattr,
-	.vop_access		= xfs_access,
 	.vop_lookup		= xfs_lookup,
 	.vop_create		= xfs_create,
 	.vop_remove		= xfs_remove,
Index: fs/xfs/linux/xfs_iops.c
===================================================================
RCS file: /var/cvs/linux-2.6/fs/xfs/linux/xfs_iops.c,v
retrieving revision 1.2
diff -u -p -r1.2 xfs_iops.c
--- fs/xfs/linux/xfs_iops.c	12 Aug 2003 19:11:20 -0000	1.2
+++ fs/xfs/linux/xfs_iops.c	16 Aug 2003 22:34:58 -0000
@@ -435,11 +435,18 @@ linvfs_permission(
 	int		mode,
 	struct nameidata *nd)
 {
+	xfs_inode_t	*ip;
 	vnode_t		*vp = LINVFS_GET_VP(inode);
 	int		error;
 
+	vn_trace_entry(BHV_TO_VNODE(bdp), __FUNCTION__,
+					       (inst_t *)__return_address);
+
 	mode <<= 6;		/* convert from linux to vnode access bits */
-	VOP_ACCESS(vp, mode, NULL, error);
+	ip = XFS_BHVTOI(bdp);
+	xfs_ilock(ip, XFS_ILOCK_SHARED);
+	error = xfs_iaccess(ip, mode, NULL);
+	xfs_iunlock(ip, XFS_ILOCK_SHARED);
 	return -error;
 }
 #else
Index: fs/xfs/linux/xfs_vnode.h
===================================================================
RCS file: /var/cvs/linux-2.6/fs/xfs/linux/xfs_vnode.h,v
retrieving revision 1.2
diff -u -p -r1.2 xfs_vnode.h
--- fs/xfs/linux/xfs_vnode.h	12 Aug 2003 19:11:20 -0000	1.2
+++ fs/xfs/linux/xfs_vnode.h	16 Aug 2003 22:34:58 -0000
@@ -173,7 +173,6 @@ typedef int	(*vop_getattr_t)(bhv_desc_t 
 				struct cred *);
 typedef int	(*vop_setattr_t)(bhv_desc_t *, struct vattr *, int,
 				struct cred *);
-typedef int	(*vop_access_t)(bhv_desc_t *, int, struct cred *);
 typedef int	(*vop_lookup_t)(bhv_desc_t *, vname_t *, vnode_t **,
 				int, vnode_t *, struct cred *);
 typedef int	(*vop_create_t)(bhv_desc_t *, vname_t *, struct vattr *,
@@ -226,7 +225,6 @@ typedef struct vnodeops {
 	vop_ioctl_t		vop_ioctl;
 	vop_getattr_t		vop_getattr;
 	vop_setattr_t		vop_setattr;
-	vop_access_t		vop_access;
 	vop_lookup_t		vop_lookup;
 	vop_create_t		vop_create;
 	vop_remove_t		vop_remove;
@@ -276,8 +274,6 @@ typedef struct vnodeops {
 	rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr)
 #define	VOP_SETATTR(vp, vap, f, cr, rv)					\
 	rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr)
-#define	VOP_ACCESS(vp, mode, cr, rv)					\
-	rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr)
 #define	VOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv)				\
 	rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr)
 #define VOP_CREATE(dvp,d,vap,vpp,cr,rv)					\
