aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2018-11-24 17:06:01 +0000
committerMark Johnston <markj@FreeBSD.org>2018-11-24 17:06:01 +0000
commit792843c38f819a0966b6169fc86af05e88bc6ecd (patch)
tree58895a7e84fbc57c7263d9bba157eb10746b3cc3 /sys/compat
parent36c4960ef829cf675aee22da292ea6002bd0d429 (diff)
downloadsrc-792843c38f819a0966b6169fc86af05e88bc6ecd.tar.gz
src-792843c38f819a0966b6169fc86af05e88bc6ecd.zip
Pass malloc flags directly through kevent(2) subroutines.
Some kevent functions have a boolean "waitok" parameter for use when calling malloc(9). Replace them with the corresponding malloc() flags: the desired behaviour is known at compile-time, so this eliminates a couple of conditional branches, and makes the code easier to read. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18318
Notes
Notes: svn path=/head/; revision=340900
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c
index bb4825574ed5..f10cccec30a4 100644
--- a/sys/compat/linux/linux_event.c
+++ b/sys/compat/linux/linux_event.c
@@ -504,7 +504,7 @@ linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args)
* and the EV_ADD flag is not set.
*/
kev[0].flags &= ~EV_ADD;
- error = kqfd_register(args->epfd, &kev[0], td, 1);
+ error = kqfd_register(args->epfd, &kev[0], td, M_WAITOK);
if (error != ENOENT) {
error = EEXIST;
goto leave0;