diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-10 09:07:21 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-04-10 09:07:21 +0000 |
commit | 9e7a386e680eb34dcad52a1cb2e016e101bd2e10 (patch) | |
tree | fafa6b04b932274554c9b74afcc5251696ccc66a /sys/kern | |
parent | 11f779a7907d0dbca7653b462a05ca2a2778e1ce (diff) |
POSIX locks should track the process's pid and not the thread's id
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_lockf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c index a02015ec28e..d406e24addf 100644 --- a/sys/kern/vfs_lockf.c +++ b/sys/kern/vfs_lockf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lockf.c,v 1.16 2010/06/29 03:14:42 tedu Exp $ */ +/* $OpenBSD: vfs_lockf.c,v 1.17 2012/04/10 09:07:20 guenther Exp $ */ /* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */ /* @@ -186,7 +186,7 @@ lf_advlock(struct lockf **head, off_t size, caddr_t id, int op, lock->lf_next = NULL; TAILQ_INIT(&lock->lf_blkhd); lock->lf_flags = flags; - lock->lf_pid = (flags & F_POSIX) ? curproc->p_pid : -1; + lock->lf_pid = (flags & F_POSIX) ? p->p_p->ps_pid : -1; switch (op) { case F_SETLK: |