From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [patch] fs: fix superblock iteration race Date: Fri, 11 Jun 2010 21:15:54 -0700 Message-ID: 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: Nick Piggin Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:41081 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649Ab0FLEQK convert rfc822-to-8bit (ORCPT ); Sat, 12 Jun 2010 00:16:10 -0400 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id o5C4Fxen010864 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL) for ; Fri, 11 Jun 2010 21:16:09 -0700 Received: by gwj15 with SMTP id 15so1311861gwj.19 for ; Fri, 11 Jun 2010 21:15:54 -0700 (PDT) In-Reply-To: <20100612035751.GG16436@laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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(-) 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. 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. But I can live with the open-coded version too. It just is a bit more code than I thought it would be. Anybody? I don't really have very strong opinions. Linus -- 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