Re: [PATCH] files-backend: cheapen refname_available check when locking refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

>> diff --git a/refs/files-backend.c b/refs/files-backend.c
>> index e9b95592b6..f2a420c611 100644
>> --- a/refs/files-backend.c
>> +++ b/refs/files-backend.c
>> @@ -631,11 +631,11 @@ static int lock_raw_ref(struct files_ref_store *refs,
>>  
>>  		/*
>>  		 * If the ref did not exist and we are creating it,
>> -		 * make sure there is no existing ref that conflicts
>> -		 * with refname:
>> +		 * make sure there is no existing packed ref that
>> +		 * conflicts with refname:
>>  		 */
>>  		if (refs_verify_refname_available(
>> -				    &refs->base, refname,
>> +				    refs->packed_ref_store, refname,
>>  				    extras, skip, err))
>>  			goto error_return;
>>  	}
>
> This seems too easy to be true. :) But I think it matches what we were
> doing before 524a9fdb51 (so it's correct), and the performance numbers
> don't lie.

Thanks, all.  The log message explained the change very well, even
though I agree that the patch text does indeed look too easy to be
true ;-).

Will queue.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux