From a444bb95a270ca5b331041c11a7e785c1e0559b7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 14 Dec 2012 16:07:11 +0100 Subject: tdb: Add a comment explaining the "check" I had to ask git blame to find why we have to do it here... Reviewed-by: Rusty Russell Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Fri Dec 21 13:54:39 CET 2012 on sn-devel-104 --- lib/tdb/common/lock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/tdb') diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c index b89cb2dd32..7155a9f470 100644 --- a/lib/tdb/common/lock.c +++ b/lib/tdb/common/lock.c @@ -374,7 +374,10 @@ static int tdb_lock_list(struct tdb_context *tdb, int list, int ltype, return tdb_lock_covered_by_allrecord_lock(tdb, ltype); } - /* Only check when we grab first data lock. */ + /* + * Check for recoveries: Someone might have kill -9'ed a process + * during a commit. + */ check = !have_data_locks(tdb); ret = tdb_nest_lock(tdb, lock_offset(list), ltype, waitflag); -- cgit