Re: [PATCH] pack-objects.c: Initialize read mutex in cmd_pack_objects
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 22, 2019, 23:05 UTC
- Message-ID
- <xmqqwomwcmyt.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190118022736.36832-1-phogg@novamoon.net>
Patrick Hogg <phogg@novamoon.net> writes:
Show 15 quoted lines
> @@ -3319,6 +3327,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
> OPT_END(),
> };
>
> + init_read_mutex();
> +
> if (DFS_NUM_STATES > (1 << OE_DFS_STATE_BITS))
> BUG("too many dfs states, increase OE_DFS_STATE_BITS");
>
> @@ -3495,5 +3505,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
> _("Total %"PRIu32" (delta %"PRIu32"),"
> " reused %"PRIu32" (delta %"PRIu32")"),
> written, written_delta, reused, reused_delta);
> +
> + cleanup_read_mutex();This is insufficient, isn't it? There is "return 0" just above the pre-context of this hunk which should probably be made to "goto clean_exit" or something, with a new label "clean_exit:" just in front of this new call to cleaup.
> return 0; > }