tdb: Add a comment explaining the "check"
[kai/samba.git] / lib / tdb / common / lock.c
index b89cb2dd32b33c01156450f767fe6839aa4d133a..7155a9f4709785681d42c4dcb760c49c6f5b4b64 100644 (file)
@@ -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);