diff options
author | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-10-28 13:44:11 +0000 |
commit | 0ad8692247694171bf2d3f963f24b15f5223a0de (patch) | |
tree | cb5d9bbe34cd6eae2c3dd212bdfdfd85569424dd /sys/fs/tmpfs | |
parent | bc6713490924420312442a3f3fc4ef1fe4b8e400 (diff) | |
download | FreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.zip FreeBSD-src-0ad8692247694171bf2d3f963f24b15f5223a0de.tar.gz |
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary
to add more V* constants, and the variables changed by this patch were often
being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 54795c1..8f76bdf 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -282,7 +282,7 @@ int tmpfs_access(struct vop_access_args *v) { struct vnode *vp = v->a_vp; - int mode = v->a_mode; + accmode_t accmode = v->a_accmode; struct ucred *cred = v->a_cred; int error; @@ -298,7 +298,7 @@ tmpfs_access(struct vop_access_args *v) case VLNK: /* FALLTHROUGH */ case VREG: - if (mode & VWRITE && vp->v_mount->mnt_flag & MNT_RDONLY) { + if (accmode & VWRITE && vp->v_mount->mnt_flag & MNT_RDONLY) { error = EROFS; goto out; } @@ -318,13 +318,13 @@ tmpfs_access(struct vop_access_args *v) goto out; } - if (mode & VWRITE && node->tn_flags & IMMUTABLE) { + if (accmode & VWRITE && node->tn_flags & IMMUTABLE) { error = EPERM; goto out; } error = vaccess(vp->v_type, node->tn_mode, node->tn_uid, - node->tn_gid, mode, cred, NULL); + node->tn_gid, accmode, cred, NULL); out: MPASS(VOP_ISLOCKED(vp)); |