From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH v2] Fix AFFS race condition. Date: Mon, 14 May 2012 12:53:18 +0200 Message-ID: <20120514105318.GH5353@quack.suse.cz> References: <4FAFBAC1.20603@gmail.com> <20120514094543.GC5353@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jan Kara , Vladimir =?utf-8?Q?'=CF=86-coder=2Fphcoder'?= Serbinenko , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Josef Bacik To: Marco Stornelli Return-path: Received: from cantor2.suse.de ([195.135.220.15]:50192 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755876Ab2ENKxe (ORCPT ); Mon, 14 May 2012 06:53:34 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon 14-05-12 12:40:45, Marco Stornelli wrote: > 2012/5/14 Jan Kara : > > On Sun 13-05-12 15:44:33, Vladimir '=CF=86-coder/phcoder' Serbinenk= o wrote: > >> AFFS code preallocates several blocks as an optimisation. Unfortun= ately > >> it's not protected by lock so the same blocks may end up allocated= twice. > >> Here is a fix. > >> > >> Signed-off-by: Vladimir Serbinenko > > =C2=A0The patch looks good to me now. Thanks! You can add: > > Reviewed-by: Jan Kara > > > > =C2=A0Al, will you merge this patch through your tree? AFFS does no= t seem to > > have a maintainer so you are a default fallback... > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Honza > > >=20 > I don't know the AFFS code, so only a question. Instead to use a spin > lock, I think we can use a simple mutex. Or is the spin lock > mandatory? So what would be an advantage of a mutex? Spinlock *is* the simple lo= cking variant... Honza --=20 Jan Kara SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html