summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2009-03-23 09:29:34 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2009-03-23 09:29:34 +0000
commit599d360b82cb69d59934037fc27b8a60f70f152a (patch)
tree8faca449b9419760f69ed9f1832853cbc4e1025b /sys
parentd3ccbe4bef7efdceedd02cf05cee413fc9722f34 (diff)
advisory locks should return ENOLCK if we're out of locks.
ok deraadt@ fgs@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_lockf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c
index 9afa0c0a367..4821612a300 100644
--- a/sys/kern/vfs_lockf.c
+++ b/sys/kern/vfs_lockf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lockf.c,v 1.13 2008/09/19 12:24:55 art Exp $ */
+/* $OpenBSD: vfs_lockf.c,v 1.14 2009/03/23 09:29:33 otto Exp $ */
/* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */
/*
@@ -183,7 +183,7 @@ lf_advlock(struct lockf **head, off_t size, caddr_t id, int op,
*/
lock = lf_alloc(p->p_ucred->cr_uid, op != F_UNLCK ? 1 : 2);
if (!lock)
- return (ENOMEM);
+ return (ENOLCK);
lock->lf_start = start;
lock->lf_end = end;
lock->lf_id = id;