diff options
author | Volker Lendecke <vl@samba.org> | 2012-12-14 16:07:11 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-21 13:54:39 +0100 |
commit | a444bb95a270ca5b331041c11a7e785c1e0559b7 (patch) | |
tree | 2275a945d72713721bccf95336e3d987a93bc7c8 /lib/tdb | |
parent | 3109b541c9b2f0063e1ccb0cdaec0a8e388b29b4 (diff) | |
download | samba-a444bb95a270ca5b331041c11a7e785c1e0559b7.tar.gz samba-a444bb95a270ca5b331041c11a7e785c1e0559b7.tar.bz2 samba-a444bb95a270ca5b331041c11a7e785c1e0559b7.zip |
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 <rusty@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Dec 21 13:54:39 CET 2012 on sn-devel-104
Diffstat (limited to 'lib/tdb')
-rw-r--r-- | lib/tdb/common/lock.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |