aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sys_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/sys_socket.c')
-rw-r--r--sys/kern/sys_socket.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c
index 18803b6a5ac0..e53b0367960b 100644
--- a/sys/kern/sys_socket.c
+++ b/sys/kern/sys_socket.c
@@ -775,10 +775,10 @@ soo_aio_cancel(struct kaiocb *job)
so = job->fd_file->f_data;
opcode = job->uaiocb.aio_lio_opcode;
- if (opcode == LIO_READ || opcode == LIO_READV)
+ if (opcode & LIO_READ)
sb = &so->so_rcv;
else {
- MPASS(opcode == LIO_WRITE || opcode == LIO_WRITEV);
+ MPASS(opcode & LIO_WRITE);
sb = &so->so_snd;
}
@@ -808,13 +808,11 @@ soo_aio_queue(struct file *fp, struct kaiocb *job)
if (error == 0)
return (0);
- switch (job->uaiocb.aio_lio_opcode) {
+ switch (job->uaiocb.aio_lio_opcode & (LIO_WRITE | LIO_READ)) {
case LIO_READ:
- case LIO_READV:
sb = &so->so_rcv;
break;
case LIO_WRITE:
- case LIO_WRITEV:
sb = &so->so_snd;
break;
default: