summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1bc992a)
raw | patch | inline | side by side (parent: 1bc992a)
author | James Bottomley <James.Bottomley@SteelEye.com> | |
Mon, 18 Apr 2005 18:44:31 +0000 (11:44 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 18 Apr 2005 18:44:31 +0000 (11:44 -0700) |
I noticed this when I tried a non-trivial scsi merge and checked the
results against BK. The problem is that remove_entry_at() actually
decrements active_nr, so decrementing it in add_cache_entry() before
calling remove_entry_at() is a double decrement (hence we lose cache
entries at the end).
results against BK. The problem is that remove_entry_at() actually
decrements active_nr, so decrementing it in add_cache_entry() before
calling remove_entry_at() is a double decrement (hence we lose cache
entries at the end).
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index 042b0c2107330c35731a4d42c9907e0b34ad5257..8571ba2f0f72cbb45640a4832539520af4ad9646 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
if (pos < active_nr && ce_stage(ce) == 0) {
while (same_name(active_cache[pos], ce)) {
ok_to_add = 1;
- active_nr--;
if (!remove_entry_at(pos))
break;
}