Re: [PATCHv7.1 3/4 (amend)] gitweb: File based caching layer (from git.kernel.org)

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

 



On Sun, 28 Nov 2010, Jakub Narebski wrote:
> On Sat, 13 Nov 2010, Jakub Narebski wrote:
> 
> > +sub cacheUpdate {
> > +       my ($action,$areForked) = @_;
> > +       my $lockingStatus;
> > +       my $fileData = "";
> > +
> > +       if($backgroundCache){
> > +               open(cacheFileBG, '>:utf8', "$fullhashpath.bg");
> > +               my $lockStatBG = flock(cacheFileBG,LOCK_EX|LOCK_NB);
> > +
> > +               $lockStatus = $lockStatBG;
> > +       }else{
> > +               open(cacheFile, '>:utf8', \$fullhashpath);
>                                             ^^^^^^^^^^^^^^
> 
> I have made mistake with this line when moving $caching_enabled check
> out of cache_fetch to its caller.
> 
> Reusing $fullhashpath variable as a *capture buffer* (it has nothing
> to do with path; it is not a filename no longer) wouldn't help there.

Errr... I meant that this abuse didn't help avoiding my mistake.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]