diff options
Diffstat (limited to 'sys/gnu/fs')
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h | 4 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/xfs_dfrag.c | 4 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/xfs_inode.c | 10 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/xfs_inode.h | 2 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/xfs_vnodeops.c | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h b/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h index c4483ea..035d583 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h @@ -292,8 +292,8 @@ typedef struct xfs_vnodeops { 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) \ diff --git a/sys/gnu/fs/xfs/xfs_dfrag.c b/sys/gnu/fs/xfs/xfs_dfrag.c index 926dfb8..77a71df 100644 --- a/sys/gnu/fs/xfs/xfs_dfrag.c +++ b/sys/gnu/fs/xfs/xfs_dfrag.c @@ -181,11 +181,11 @@ xfs_swap_extents( 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; diff --git a/sys/gnu/fs/xfs/xfs_inode.c b/sys/gnu/fs/xfs/xfs_inode.c index b0e3ca6..53d46f0 100644 --- a/sys/gnu/fs/xfs/xfs_inode.c +++ b/sys/gnu/fs/xfs/xfs_inode.c @@ -3610,7 +3610,7 @@ xfs_iflush_all( int xfs_iaccess( xfs_inode_t *ip, - mode_t mode, + accmode_t accmode, cred_t *cr) { xfs_vnode_t *vp; @@ -3624,10 +3624,10 @@ xfs_iaccess( /* * 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 @@ xfs_iaccess( * 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); } diff --git a/sys/gnu/fs/xfs/xfs_inode.h b/sys/gnu/fs/xfs/xfs_inode.h index 6bbc121..3b77381 100644 --- a/sys/gnu/fs/xfs/xfs_inode.h +++ b/sys/gnu/fs/xfs/xfs_inode.h @@ -455,7 +455,7 @@ void xfs_iunpin(xfs_inode_t *); 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 *); diff --git a/sys/gnu/fs/xfs/xfs_vnodeops.c b/sys/gnu/fs/xfs/xfs_vnodeops.c index 32a6370..ff9d929 100644 --- a/sys/gnu/fs/xfs/xfs_vnodeops.c +++ b/sys/gnu/fs/xfs/xfs_vnodeops.c @@ -922,7 +922,7 @@ xfs_setattr( STATIC int xfs_access( bhv_desc_t *bdp, - int mode, + accmode_t accmode, cred_t *credp) { xfs_inode_t *ip; @@ -933,7 +933,7 @@ xfs_access( 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_change_file_space( 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; } |