aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authorSeigo Tanimura <tanimura@FreeBSD.org>2002-02-23 11:12:57 +0000
committerSeigo Tanimura <tanimura@FreeBSD.org>2002-02-23 11:12:57 +0000
commitf591779bb575703cbb6674d324afb4bd212b8cbb (patch)
tree2289c653c0f7aa23498f82b603c33107952652ec /sys/kern/vfs_aio.c
parent4aaca8854285a47e7fd520d5a2797dbf03d05bec (diff)
downloadsrc-f591779bb575703cbb6674d324afb4bd212b8cbb.tar.gz
src-f591779bb575703cbb6674d324afb4bd212b8cbb.zip
Notes
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 3acdf2b606c0..84c140868e59 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -22,6 +22,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/malloc.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/sysproto.h>
@@ -741,6 +742,8 @@ aio_daemon(void *uproc)
struct proc *curcp, *mycp, *userp;
struct vmspace *myvm, *tmpvm;
struct thread *td = curthread;
+ struct pgrp *newpgrp;
+ struct session *newsess;
mtx_lock(&Giant);
/*
@@ -781,7 +784,12 @@ aio_daemon(void *uproc)
mycp->p_fd = NULL;
/* The daemon resides in its own pgrp. */
- enterpgrp(mycp, mycp->p_pid, 1);
+ MALLOC(newpgrp, struct pgrp *, sizeof(struct pgrp), M_PGRP, M_WAITOK | M_ZERO);
+ MALLOC(newsess, struct session *, sizeof(struct session), M_SESSION, M_WAITOK | M_ZERO);
+
+ PGRPSESS_XLOCK();
+ enterpgrp(mycp, mycp->p_pid, newpgrp, newsess);
+ PGRPSESS_XUNLOCK();
/* Mark special process type. */
mycp->p_flag |= P_SYSTEM;