diff options
author | phk <phk@FreeBSD.org> | 2003-06-22 08:41:43 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-06-22 08:41:43 +0000 |
commit | c81c59299bd255eb5ab7510c9e84e9c54b8003d0 (patch) | |
tree | c8262a3d430fc3cafab7fb6aec641ce293cd3361 /sys/kern/vfs_aio.c | |
parent | 4a223af282e5f60223c443ce3755f565f9db2465 (diff) | |
download | FreeBSD-src-c81c59299bd255eb5ab7510c9e84e9c54b8003d0.zip FreeBSD-src-c81c59299bd255eb5ab7510c9e84e9c54b8003d0.tar.gz |
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.
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r-- | sys/kern/vfs_aio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index ef6e305..fc52073 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -1059,7 +1059,7 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe) if (fp->f_type != DTYPE_VNODE) return (-1); - vp = fp->f_data; + vp = fp->f_vnode; /* * If its not a disk, we don't want to return a positive error. @@ -1723,7 +1723,7 @@ aio_cancel(struct thread *td, struct aio_cancel_args *uap) return (EBADF); if (fp->f_type == DTYPE_VNODE) { - vp = fp->f_data; + vp = fp->f_vnode; if (vn_isdisk(vp,&error)) { td->td_retval[0] = AIO_NOTCANCELED; |