git-commit-vandalism/builtin
Thomas Rast 8f82aad4e7 index-pack: guard nr_resolved_deltas reads by lock
The threaded parts of index-pack increment the number of resolved
deltas in nr_resolved_deltas guarded by counter_mutex.  However, the
per-thread outer loop accessed nr_resolved_deltas without any locks.

This is not wrong as such, since it doesn't matter all that much
whether we get an outdated value.  However, unless someone proves that
this one lock makes all the performance difference, it would be much
cleaner to guard _all_ accesses to the variable with the lock.

The only such use is display_progress() in the threaded section (all
others are in the conclude_pack() callchain outside the threaded
part).  To make it obvious that it cannot deadlock, move it out of
work_mutex.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-03-19 08:40:47 -07:00
..
add.c Merge branch 'ar/clone-honor-umask-at-top' into maint 2012-07-22 13:04:05 -07:00
annotate.c
apply.c Merge branch 'maint-1.7.11' into maint 2012-09-12 14:08:05 -07:00
archive.c
bisect--helper.c
blame.c Merge branch 'jc/maint-blame-no-such-path' into maint 2012-09-24 12:40:02 -07:00
branch.c
bundle.c
cat-file.c Merge branch 'maint-1.7.11' into maint 2012-09-10 15:31:06 -07:00
check-attr.c Add missing -z to git check-attr usage text for consistency with man page 2012-09-17 13:45:32 -07:00
check-ref-format.c
checkout-index.c
checkout.c Sync with 1.7.11.6 2012-09-11 11:23:54 -07:00
clean.c
clone.c Merge branch 'rt/maint-clone-single' into maint 2012-10-08 11:34:02 -07:00
column.c
commit-tree.c Merge branch 'kk/maint-commit-tree' 2012-07-23 20:55:54 -07:00
commit.c Merge branch 'os/commit-submodule-ignore' into maint 2012-10-08 11:34:34 -07:00
config.c Merge branch 'jk/config-warn-on-inaccessible-paths' into maint 2012-09-18 14:24:06 -07:00
count-objects.c
credential.c git credential fill: output the whole 'struct credential' 2012-06-25 11:56:24 -07:00
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c Merge branch 'tr/void-diff-setup-done' into maint-1.7.11 2012-09-11 10:53:40 -07:00
fast-export.c Merge branch 'js/fast-export-paths-with-spaces' into maint 2012-07-22 13:00:45 -07:00
fetch-pack.c fetch-pack: mention server version with verbose output 2012-08-13 21:56:05 -07:00
fetch.c Merge branch 'dj/fetch-all-tags' into maint 2012-09-24 12:39:21 -07:00
fmt-merge-msg.c Merge branch 'jc/fmt-merge-msg-people' 2012-06-12 08:33:30 -07:00
for-each-ref.c for-each-ref: Fix sort with multiple keys 2012-08-21 14:42:12 -07:00
fsck.c
gc.c
grep.c Merge branch 'jc/maint-log-grep-all-match-1' into maint 2012-09-29 22:30:56 -07:00
hash-object.c
help.c Merge branch 'cw/help-over-network' 2012-07-09 09:02:19 -07:00
index-pack.c index-pack: guard nr_resolved_deltas reads by lock 2013-03-19 08:40:47 -07:00
init-db.c git on Mac OS and precomposed unicode 2012-07-08 22:03:46 -07:00
log.c Merge branch 'mz/cherry-pick-cmdline-order' into maint 2012-09-14 21:24:18 -07:00
ls-files.c path_excluded(): update API to less cache-entry centric 2012-06-05 21:22:36 -07:00
ls-remote.c ls-remote: document the '--get-url' option 2012-09-07 10:58:35 -07:00
ls-tree.c
mailinfo.c Merge branch 'lt/mailinfo-handle-attachment-more-sanely' into maint 2012-10-08 11:33:00 -07:00
mailsplit.c
merge-base.c Documentation: update to git-merge-base --octopus 2011-04-15 10:13:52 -07:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'tr/void-diff-setup-done' into maint-1.7.11 2012-09-11 10:53:40 -07:00
mktag.c
mktree.c
mv.c
name-rev.c
notes.c
pack-objects.c Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c prune.c: only print informational message in show_only or verbose mode 2012-08-07 15:01:37 -07:00
push.c
read-tree.c
receive-pack.c receive-pack: drop "n/a" on unpacker errors 2012-09-21 09:50:13 -07:00
reflog.c reflog: remove i18n legos in pruning message 2012-06-07 11:49:16 -07:00
remote-ext.c
remote-fd.c
remote.c remote: prefer subcommand name 'remove' to 'rm' 2012-09-06 13:23:22 -07:00
replace.c
rerere.c
reset.c Merge branch 'jc/sha1-name-more' 2012-07-22 12:55:07 -07:00
rev-list.c Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint 2012-05-14 11:46:16 -07:00
rev-parse.c Merge branch 'maint-1.7.11' into maint 2012-09-12 14:08:05 -07:00
revert.c cherry-pick/revert: respect order of revisions to pick 2012-08-30 14:00:23 -07:00
rm.c
send-pack.c do not send client agent unless server does first 2012-08-10 12:35:13 -07:00
shortlog.c
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c
tag.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
tar-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-file.c
unpack-objects.c
update-index.c Merge branch 'hv/submodule-update-nuke-submodules' into maint 2012-07-11 12:46:31 -07:00
update-ref.c
update-server-info.c
upload-archive.c
var.c ident: rename IDENT_ERROR_ON_NO_NAME to IDENT_STRICT 2012-05-24 17:16:41 -07:00
verify-pack.c
verify-tag.c
write-tree.c