[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/dlm-kernel/src lkb.c

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4U4
Changes by:	teigland sourceware org	2006-09-18 17:00:23

Modified files:
	dlm-kernel/src : lkb.c 

Log message:
	Don't create lkids of 0.  When the lkid counter for bucket 0 of the
	hash table rolls over (it's uint16), we'd get a lkid of zero and
	assign it to the new lkb.  lock_dlm would be confused by a zero lkid
	and use some other, incorrect value as the lkid which would lead to
	a dlm error which would lead to a lock_dlm/gfs panic.
	this should fix bz 199673
	it may also fix bz 172944


--- cluster/dlm-kernel/src/Attic/lkb.c	2005/01/18 10:46:52
+++ cluster/dlm-kernel/src/Attic/lkb.c	2006/09/18 17:00:23
@@ -79,6 +79,11 @@
 	lkid = bucket | (ls->ls_lkbtbl[bucket].counter++ << 16);
+	if (!lkid) {
+		write_unlock(&ls->ls_lkbtbl[bucket].lock);
+		goto retry;
+	}
 	if (__find_lock_by_id(ls, lkid)) {
 		goto retry;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]