Re: [PATCH 00/11] various lockfile-leaks and -fixes
From: Junio C Hamano <hidden>
Date: 2017-10-02 02:38:07
Martin Ågren [off-list ref] writes:
Martin Ågren (11): sha1_file: do not leak `lock_file` treewide: prefer lockfiles on the stack lockfile: fix documentation on `close_lock_file_gently()` tempfile: fix documentation on `delete_tempfile()` cache-tree: simplify locking logic apply: move lockfile into `apply_state` apply: remove `newfd` from `struct apply_state` cache.h: document `write_locked_index()` read-cache: require flags for `write_locked_index()` read-cache: don't leave dangling pointer in `do_write_index()` read-cache: roll back lock on error with `COMMIT_LOCK` apply.c | 25 ++++++++----------------- apply.h | 8 +++----- builtin/am.c | 27 ++++++++++++--------------- builtin/apply.c | 4 +--- builtin/checkout.c | 14 ++++++-------- builtin/clone.c | 7 +++---- builtin/diff.c | 7 +++---- builtin/difftool.c | 1 - cache-tree.c | 12 ++++-------- cache.h | 19 +++++++++++++++++++ config.c | 17 ++++++++--------- git-compat-util.h | 7 ++++++- lockfile.h | 4 ++-- merge-recursive.c | 6 +++--- merge.c | 8 +++----- read-cache.c | 26 ++++++++++++++------------ sequencer.c | 1 - sha1_file.c | 16 +++++++--------- tempfile.h | 8 ++++---- wt-status.c | 8 ++++---- 20 files changed, 110 insertions(+), 115 deletions(-)
That's quite a lot of changes to the low-level code. I'll need to revisit this topic later once again, but from a cursory read did not find anything glaringly wrong in it. Thanks for working on this.