Index: gnu/fs/xfs/xfs_vnodeops.c =================================================================== --- gnu/fs/xfs/xfs_vnodeops.c (revision 184568) +++ gnu/fs/xfs/xfs_vnodeops.c (working copy) @@ -922,7 +922,7 @@ STATIC int xfs_access( bhv_desc_t *bdp, - int mode, + accmode_t accmode, cred_t *credp) { xfs_inode_t *ip; @@ -933,7 +933,7 @@ ip = XFS_BHVTOI(bdp); xfs_ilock(ip, XFS_ILOCK_SHARED); - error = xfs_iaccess(ip, mode, credp); + error = xfs_iaccess(ip, accmode, credp); xfs_iunlock(ip, XFS_ILOCK_SHARED); return error; } @@ -4538,7 +4538,7 @@ xfs_ilock(ip, XFS_ILOCK_SHARED); - if ((error = xfs_iaccess(ip, S_IWUSR, credp))) { + if ((error = xfs_iaccess(ip, VWRITE, credp))) { xfs_iunlock(ip, XFS_ILOCK_SHARED); return error; } Index: gnu/fs/xfs/xfs_inode.c =================================================================== --- gnu/fs/xfs/xfs_inode.c (revision 184568) +++ gnu/fs/xfs/xfs_inode.c (working copy) @@ -3610,7 +3610,7 @@ int xfs_iaccess( xfs_inode_t *ip, - mode_t mode, + accmode_t accmode, cred_t *cr) { xfs_vnode_t *vp; @@ -3624,10 +3624,10 @@ /* * Verify that the MAC policy allows the requested access. */ - if ((error = _MAC_XFS_IACCESS(ip, mode, cr))) + if ((error = _MAC_XFS_IACCESS(ip, accmode, cr))) return XFS_ERROR(error); - if (mode & S_IWUSR) { + if (accmode & VWRITE) { xfs_mount_t *mp = ip->i_mount; if ((XVFSTOMNT(XFS_MTOVFS(mp))->mnt_flag & MNT_RDONLY) && @@ -3644,13 +3644,13 @@ * If there's an Access Control List it's used instead of * the mode bits. */ - if ((error = _ACL_XFS_IACCESS(ip, mode, cr)) != -1) + if ((error = _ACL_XFS_IACCESS(ip, accmode, cr)) != -1) return error ? XFS_ERROR(error) : 0; /* FreeBSD local change here */ error = vaccess(vp->v_vnode->v_type, imode, ip->i_d.di_uid, ip->i_d.di_gid, - mode, cr, NULL); + accmode, cr, NULL); return (error); } Index: gnu/fs/xfs/xfs_inode.h =================================================================== --- gnu/fs/xfs/xfs_inode.h (revision 184568) +++ gnu/fs/xfs/xfs_inode.h (working copy) @@ -455,7 +455,7 @@ int xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_t *, int); int xfs_iflush(xfs_inode_t *, uint); void xfs_iflush_all(struct xfs_mount *); -int xfs_iaccess(xfs_inode_t *, mode_t, cred_t *); +int xfs_iaccess(xfs_inode_t *, accmode_t, cred_t *); uint xfs_iroundup(uint); void xfs_ichgtime(xfs_inode_t *, int); xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); Index: gnu/fs/xfs/xfs_dfrag.c =================================================================== --- gnu/fs/xfs/xfs_dfrag.c (revision 184568) +++ gnu/fs/xfs/xfs_dfrag.c (working copy) @@ -181,11 +181,11 @@ locked = 1; /* Check permissions */ - error = xfs_iaccess(ip, S_IWUSR, NULL); + error = xfs_iaccess(ip, VWRITE, NULL); if (error) goto error0; - error = xfs_iaccess(tip, S_IWUSR, NULL); + error = xfs_iaccess(tip, VWRITE, NULL); if (error) goto error0; Index: gnu/fs/xfs/FreeBSD/xfs_vnode.h =================================================================== --- gnu/fs/xfs/FreeBSD/xfs_vnode.h (revision 184568) +++ gnu/fs/xfs/FreeBSD/xfs_vnode.h (working copy) @@ -292,8 +292,8 @@ rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr) #define XVOP_SETATTR(vp, vap, f, cr, rv) \ rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr) -#define XVOP_ACCESS(vp, mode, cr, rv) \ - rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr) +#define XVOP_ACCESS(vp, accmode, cr, rv) \ + rv = _VOP_(vop_access, vp)((vp)->v_fbhv, accmode, cr) #define XVOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \ rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr) #define XVOP_CREATE(dvp,d,vap,vpp,cr,rv) \