From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [patch] fs: fix superblock iteration race Date: Sat, 12 Jun 2010 14:38:48 +1000 Message-ID: <20100612043848.GH16436@laptop> References: <20100611145009.GE16436@laptop> <20100612035751.GG16436@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Al Viro , linux-fsdevel@vger.kernel.org To: Linus Torvalds Return-path: Received: from cantor2.suse.de ([195.135.220.15]:47564 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809Ab0FLEiw (ORCPT ); Sat, 12 Jun 2010 00:38:52 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 11, 2010 at 09:15:54PM -0700, Linus Torvalds wrote: > On Fri, Jun 11, 2010 at 8:57 PM, Nick Piggin wrote: > > > > Something like this > > > > =A0fs/dcache.c | =A0 14 ++++++++++++-- > > =A0fs/super.c =A0| =A0 51 +++++++++++++++++++++++++++++++++++++++++= ++++------ > > =A02 files changed, 57 insertions(+), 8 deletions(-) >=20 > Ok, I have to admit that I didn't expect it to blow up quite that > badly - I thought it would add a line or two, not 50. In fairness I added a lot more comments and a bit of whitespace, accounting for about half of those lines added. =20 > So wow I wonder if we should use your old approach instead, just make > it an 'official' thing. IOW, maybe we can use > "list_for_each_entry_safe()" after all, but simply introduce a > "reset_next_entry()" helper or something and make that be part of the > "calling convention" for those things. >=20 > But I can live with the open-coded version too. It just is a bit more > code than I thought it would be. >=20 > Anybody? I don't really have very strong opinions. I wouldn't mind a list macro to reset. I'd prefer the name match better with the iterator macro though. list_safe_reset_next()? -- 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