From 8a7c535db1f40a0f7c43d4e36227ad172bf6a654 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 18 Jun 2012 22:30:28 +0930 Subject: ntdb: make fork test more thorough. We document that the child of a fork() can do a brunlock() if the parent does a brlock: we should not log an error when they do this. Also, test the case where we fork() and return inside a parse function (which is allowed). Signed-off-by: Rusty Russell --- lib/ntdb/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ntdb/lock.c') diff --git a/lib/ntdb/lock.c b/lib/ntdb/lock.c index 167770d097..625a2c4934 100644 --- a/lib/ntdb/lock.c +++ b/lib/ntdb/lock.c @@ -232,7 +232,7 @@ static enum NTDB_ERROR ntdb_brunlock(struct ntdb_context *ntdb, return NTDB_SUCCESS; } - if (!check_lock_pid(ntdb, "ntdb_brunlock", true)) + if (!check_lock_pid(ntdb, "ntdb_brunlock", false)) return NTDB_ERR_LOCK; if (unlock(ntdb, rw_type, offset, len) == -1) { -- cgit