diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-09 03:19:53 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-09 03:19:53 +0000 |
commit | 76954ad68a25c559c6a8b2911674760afd4962f6 (patch) | |
tree | 80cdb7116c19e2e4f42aeed31a65f76a54db11df /sys/kern/sysv_shm.c | |
parent | 993799493c64eb0b9faeab971fbe4ecfe0214278 (diff) | |
parent | 16a80466e5837ad617b6b144297fd6069188b9b3 (diff) | |
download | FreeBSD-src-76954ad68a25c559c6a8b2911674760afd4962f6.zip FreeBSD-src-76954ad68a25c559c6a8b2911674760afd4962f6.tar.gz |
Merge from vmcontention.
Diffstat (limited to 'sys/kern/sysv_shm.c')
-rw-r--r-- | sys/kern/sysv_shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 5c35514..a1c6b34 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mutex.h> #include <sys/racct.h> #include <sys/resourcevar.h> +#include <sys/rwlock.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/syscallsubr.h> @@ -707,10 +708,10 @@ shmget_allocate_segment(td, uap, mode) #endif return (ENOMEM); } - VM_OBJECT_LOCK(shm_object); + VM_OBJECT_WLOCK(shm_object); vm_object_clear_flag(shm_object, OBJ_ONEMAPPING); vm_object_set_flag(shm_object, OBJ_NOSPLIT); - VM_OBJECT_UNLOCK(shm_object); + VM_OBJECT_WUNLOCK(shm_object); shmseg->object = shm_object; shmseg->u.shm_perm.cuid = shmseg->u.shm_perm.uid = cred->cr_uid; |