Return correct error code on lock fail in tdb_expand.
authorJeremy Allison <jra@samba.org>
Wed, 19 Sep 2001 00:02:28 +0000 (00:02 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 19 Sep 2001 00:02:28 +0000 (00:02 +0000)
Jeremy.
(This used to be commit b45793ec3f6ff04587bee8f463ef6410b06097d6)

source3/tdb/tdb.c

index 4eb851a94380258844b932d7451e18123c42d865..4714844758c5161a45e8f76aa02aa87495b2f929 100644 (file)
@@ -637,7 +637,7 @@ static int tdb_expand(TDB_CONTEXT *tdb, tdb_off size)
 
        if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
                TDB_LOG((tdb, 0, "lock failed in tdb_expand\n"));
-               return 0;
+               return -1;
        }
 
        /* must know about any previous expansions by another process */