X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.c;h=e2e6c64fec64d188fed1b92184fbf64ad9951fd1;hb=aa6f4ffe51b1963228abe0d001ba77b6e45bc1bf;hp=7d842d80fd035c9331ff7819c38906d30804aff3;hpb=98ba6e4755c71587feffeacf43f996a22a8e0689;p=ccan diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 7d842d80..e2e6c64f 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -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)