[DRBD-cvs] drbd by phil; LGE pointed out that the check against l...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Sun, 7 Mar 2004 21:31:36 +0100 (CET)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	lru_cache.c 


Log Message:
LGE pointed out that the check against lc->changing_element is
not necessary. [ It gets removed from the hash chains in lc_evict() ]

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Attic/lru_cache.c,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -3 -r1.1.2.23 -r1.1.2.24
--- lru_cache.c	7 Mar 2004 17:57:25 -0000	1.1.2.23
+++ lru_cache.c	7 Mar 2004 20:31:31 -0000	1.1.2.24
@@ -107,10 +107,7 @@
 	BUG_ON(!lc);
 	BUG_ON(!lc->nr_elements);
 	hlist_for_each_entry(e, n, lc->slot + lc_hash_fn(lc, enr), colision) {
-		if (e->lc_number == enr) {
-			if( likely(e != lc->changing_element) ) return e;
-			return NULL;
-		}
+		if (e->lc_number == enr) return e;
 	}
 	return NULL;
 }