From 41b7acacb304a023deca717930fc4dda15565226 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 13 Feb 2014 17:03:46 +0100 Subject: tdb: in tdb_delete_hash, make lock/unlock bracket more obvious by using the same variable as hash as in the lock. Signed-off-by: Michael Adam Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Feb 15 03:21:07 CET 2014 on sn-devel-104 --- lib/tdb/common/tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tdb') diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c index f24493ccd84..1e41e84c82a 100644 --- a/lib/tdb/common/tdb.c +++ b/lib/tdb/common/tdb.c @@ -421,7 +421,7 @@ static int tdb_delete_hash(struct tdb_context *tdb, TDB_DATA key, uint32_t hash) tdb_increment_seqnum(tdb); } - if (tdb_unlock(tdb, BUCKET(rec.full_hash), F_WRLCK) != 0) + if (tdb_unlock(tdb, BUCKET(hash), F_WRLCK) != 0) TDB_LOG((tdb, TDB_DEBUG_WARNING, "tdb_delete: WARNING tdb_unlock failed!\n")); return ret; } -- cgit