Re: [PATCH v2 5/7] reftable/system: provide thin wrapper for tempfile subsystem
- From
karthik nayak <karthik.188@gmail.com>
- Date
- Nov 18, 2024, 14:29 UTC
- Message-ID
- <CAOLa=ZQ9Etqz2t=OnsvVzVSyhSSB1jp6BYQ=FML8-_u8PGGVkw@mail.gmail.com>
- In-Reply-To
- <CAOLa=ZQXXR3RR_2zBfCmR06t101W1X5VqN3P_LYYz+AMJKu+=Q@mail.gmail.com>
karthik nayak <karthik.188@gmail.com> writes:
Show 14 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> [snip]
>
>> +
>> +int tmpfile_close(struct reftable_tmpfile *t)
>> +{
>> + struct tempfile *tempfile = t->priv;
>> + int ret = close_tempfile_gently(tempfile);
>> + t->fd = -1;
>
> Nit: below we do `*t = REFTABLE_TMPFILE_INIT` should we keep things
> consistent and do the same here?
>My bad, we want this to still hold onto `t->priv` which is cleared when we call tmpfile_delete(). So all good here.