Subject: Re: [PATCH 6/8] reftable/stack: use lock_file when adding table to "tables.list"

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 1 Aug 2024 10:40:58 +0200

On Wed, Jul 31, 2024 at 06:02:41PM -0500, Justin Tobler wrote:
> On 24/07/31 04:15PM, Patrick Steinhardt wrote:
> > @@ -674,13 +675,14 @@ int reftable_addition_commit(struct reftable_addition *add)
> >  		goto done;
> >  	}
> >  
> > -	err = fsync_component(FSYNC_COMPONENT_REFERENCE, lock_file_fd);
> > +	err = fsync_component(FSYNC_COMPONENT_REFERENCE,
> > +			      get_lock_file_fd(&add->tables_list_lock));
> 
> I might be missing something, but is there a reason we have to get the
> lock file fd again instead of just using `lock_file_fd`?

Not really. No idea what I was thinking here, will fix.

Patrick