lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 23 Aug 2010 22:50:24 -0400
From:	Josef Bacik <josef@...hat.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Josef Bacik <josef@...hat.com>,
	Chris Mason <chris.mason@...cle.com>,
	linux-btrfs@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] btrfs: update stats when allocating from a cluster

On Tue, Aug 24, 2010 at 08:50:57AM +0800, Li Zefan wrote:
> >>  	spin_unlock(&cluster->lock);
> >>  
> >> +	if (!ret)
> >> +		return 0;
> >> +
> >> +	spin_lock(&block_group->tree_lock);
> >> +
> >> +	block_group->free_space -= bytes;
> >> +	if (entry->bytes == 0) {
> >> +		block_group->free_extents--;
> >> +		kfree(entry);
> >> +	}
> >> +
> >> +	spin_unlock(&block_group->tree_lock);
> >> +
> > 
> > Move this part up so we don't drop the spinlock and then re-grab it.  Thanks,
> > 
> 
> But they are 2 different locks. ;)
> 
> And we can't grab block_group->tree_lock when holding cluster->lock.

Ugh Jesus sorry, ignore me.

Reviewed-by: Josef Bacik <josef@...hat.com>

Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ