Merge branch 'ph/pack-objects-mutex-fix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 5 Feb 2019 22:26:16 +0000 (14:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Feb 2019 22:26:16 +0000 (14:26 -0800)
"git pack-objects" incorrectly used uninitialized mutex, which has
been corrected.

* ph/pack-objects-mutex-fix:
pack-objects: merge read_lock and lock in packing_data struct
pack-objects: move read mutex to packing_data struct

1  2 
builtin/pack-objects.c
pack-objects.c
pack-objects.h
Simple merge
diff --cc pack-objects.c
Simple merge
diff --cc pack-objects.h
index 3cd8d1f00a95978a5a8c86805506b9927aefcd0e,1667cbad8f6a5637b8948de9bf43ffae9689f131..6bfacc7d2cedd7f399d7807b7746b6ed66737eed
@@@ -166,11 -167,12 +170,12 @@@ struct packing_data 
        unsigned char *layer;
  };
  
 -void prepare_packing_data(struct packing_data *pdata);
 +void prepare_packing_data(struct repository *r, struct packing_data *pdata);
  
+ /* Protect access to object database */
  static inline void packing_data_lock(struct packing_data *pdata)
  {
-       pthread_mutex_lock(&pdata->lock);
+       pthread_mutex_lock(&pdata->odb_lock);
  }
  static inline void packing_data_unlock(struct packing_data *pdata)
  {