提交 a4b7dbef 编写于 作者: J James Bottomley 提交者: Linus Torvalds

[PATCH] fix bug in read-cache.c which loses files when merging a tree

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).
上级 1bc992ac
......@@ -402,7 +402,6 @@ int add_cache_entry(struct cache_entry *ce, int ok_to_add)
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册