diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-22 08:41:43 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-06-22 08:41:43 +0000 |
commit | 3b6d96526388c71176bb69ee0ee30fa3e4332626 (patch) | |
tree | c8262a3d430fc3cafab7fb6aec641ce293cd3361 /sys/kern/subr_acl_posix1e.c | |
parent | 93cdc37dbf51fed3530a523d5d03743c13dab5b5 (diff) |
Add a f_vnode field to struct file.
Several of the subtypes have an associated vnode which is used for
stuff like the f*() functions.
By giving the vnode a speparate field, a number of checks for the specific
subtype can be replaced simply with a check for f_vnode != NULL, and
we can later free f_data up to subtype specific use.
At this point in time, f_data still points to the vnode, so any code I
might have overlooked will still work.
Notes
Notes:
svn path=/head/; revision=116678
Diffstat (limited to 'sys/kern/subr_acl_posix1e.c')
-rw-r--r-- | sys/kern/subr_acl_posix1e.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c index d1bce92f7136..5a60f78ac258 100644 --- a/sys/kern/subr_acl_posix1e.c +++ b/sys/kern/subr_acl_posix1e.c @@ -781,7 +781,7 @@ __acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap) mtx_lock(&Giant); error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error == 0) { - error = vacl_get_acl(td, fp->f_data, uap->type, uap->aclp); + error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); } mtx_unlock(&Giant); @@ -802,7 +802,7 @@ __acl_set_fd(struct thread *td, struct __acl_set_fd_args *uap) mtx_lock(&Giant); error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error == 0) { - error = vacl_set_acl(td, fp->f_data, uap->type, uap->aclp); + error = vacl_set_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); } mtx_unlock(&Giant); @@ -867,7 +867,7 @@ __acl_delete_fd(struct thread *td, struct __acl_delete_fd_args *uap) mtx_lock(&Giant); error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error == 0) { - error = vacl_delete(td, fp->f_data, uap->type); + error = vacl_delete(td, fp->f_vnode, uap->type); fdrop(fp, td); } mtx_unlock(&Giant); @@ -932,7 +932,7 @@ __acl_aclcheck_fd(struct thread *td, struct __acl_aclcheck_fd_args *uap) mtx_lock(&Giant); error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error == 0) { - error = vacl_aclcheck(td, fp->f_data, uap->type, uap->aclp); + error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); } mtx_unlock(&Giant); |