Commit 9975a26b authored by Rusty Russell's avatar Rusty Russell

failtest: fix locking code.

We need to get the locks back *after* the child runs.
parent 98ba6e47
......@@ -983,7 +983,6 @@ int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...)
}
p = add_history(FAILTEST_FCNTL, file, line, &call);
get_locks();
if (should_fail(p)) {
p->u.fcntl.ret = -1;
......@@ -992,6 +991,7 @@ int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...)
else
p->error = EDEADLK;
} else {
get_locks();
p->u.fcntl.ret = fcntl(p->u.fcntl.fd, p->u.fcntl.cmd,
&p->u.fcntl.arg.fl);
if (p->u.fcntl.ret == -1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment