linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org
Subject: Re: [patch] fs: fix superblock iteration race
Date: Sat, 12 Jun 2010 14:38:48 +1000	[thread overview]
Message-ID: <20100612043848.GH16436@laptop> (raw)
In-Reply-To: <AANLkTimK0xCQaapWVIgBdkgypgNiJ2LTbmbt-O2eLd5B@mail.gmail.com>

On Fri, Jun 11, 2010 at 09:15:54PM -0700, Linus Torvalds wrote:
> On Fri, Jun 11, 2010 at 8:57 PM, Nick Piggin <npiggin@suse.de> wrote:
> >
> > Something like this
> >
> >  fs/dcache.c |   14 ++++++++++++--
> >  fs/super.c  |   51 +++++++++++++++++++++++++++++++++++++++++++++------
> >  2 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.

In fairness I added a lot more comments and a bit of whitespace,
accounting for about half of those lines added.

 
> 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.

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

  reply	other threads:[~2010-06-12  4:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-11 14:50 [patch] fs: fix superblock iteration race Nick Piggin
2010-06-11 16:06 ` Linus Torvalds
2010-06-12  3:37   ` Nick Piggin
2010-06-12  3:57   ` Nick Piggin
2010-06-12  4:15     ` Linus Torvalds
2010-06-12  4:38       ` Nick Piggin [this message]
2010-06-12  4:46         ` Linus Torvalds
2010-06-14 15:07           ` Nick Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100612043848.GH16436@laptop \
    --to=npiggin@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).