summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
committerdillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
commitddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch)
tree19da0d56c468b8e0f6d0361d7d39157f561aa69f /sys/kern/vfs_aio.c
parent07cbccc353d7afbe8948b6025965ca36739d7373 (diff)
downloadFreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip
FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 2f63af9..3b8f1d8 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -555,7 +555,7 @@ aio_proc_rundown(struct proc *p)
aiocbn = TAILQ_NEXT(aiocbe, plist);
fp = aiocbe->fd_file;
if (fp != NULL) {
- so = (struct socket *)fp->f_data;
+ so = fp->un_data.socket;
TAILQ_REMOVE(&so->so_aiojobq, aiocbe, list);
if (TAILQ_EMPTY(&so->so_aiojobq)) {
so->so_snd.sb_flags &= ~SB_AIO;
@@ -1059,7 +1059,7 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe)
if (fp->f_type != DTYPE_VNODE)
return (-1);
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
/*
* If its not a disk, we don't want to return a positive error.
@@ -1406,7 +1406,7 @@ _aio_aqueue(struct thread *td, struct aiocb *job, struct aio_liojob *lj, int typ
error = EBADF;
goto aqueue_fail;
}
- kq = (struct kqueue *)kq_fp->f_data;
+ kq = kq_fp->un_data.kqueue;
kev.ident = (uintptr_t)aiocbe->uuaiocb;
kev.filter = EVFILT_AIO;
kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1;
@@ -1441,7 +1441,7 @@ no_kqueue:
* socket, and set the flags so we get a call when sbnotify()
* happens.
*/
- so = (struct socket *)fp->f_data;
+ so = fp->un_data.socket;
s = splnet();
if (((opcode == LIO_READ) && (!soreadable(so))) || ((opcode ==
LIO_WRITE) && (!sowriteable(so)))) {
@@ -1731,14 +1731,14 @@ aio_cancel(struct thread *td, struct aio_cancel_args *uap)
return (EBADF);
if (fp->f_type == DTYPE_VNODE) {
- vp = (struct vnode *)fp->f_data;
+ vp = fp->un_data.vnode;
if (vn_isdisk(vp,&error)) {
td->td_retval[0] = AIO_NOTCANCELED;
return 0;
}
} else if (fp->f_type == DTYPE_SOCKET) {
- so = (struct socket *)fp->f_data;
+ so = fp->un_data.socket;
s = splnet();
OpenPOWER on IntegriCloud