mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Rob Landley <rob@landley.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RESEND] The initmpfs patches.
Date: Mon, 15 Jul 2013 14:01:35 -0700	[thread overview]
Message-ID: <20130715140135.0f896a584fec9f7861049b64@linux-foundation.org> (raw)
In-Reply-To: <1373421999.27613.37@driftwood>

On Tue, 09 Jul 2013 21:06:39 -0500 Rob Landley <rob@landley.net> wrote:

> Attached, so you don't have to fish them out of:
> 
>    http://lkml.indiana.edu/hypermail/linux/kernel/1306.3/04204.html

Too hard.  Especially when I want to reply to a patch.  Please resend
as a patch series in the time-honoured fashion?

> --- a/fs/ramfs/inode.c
> +++ b/fs/ramfs/inode.c
> @@ -247,7 +247,14 @@ struct dentry *ramfs_mount(struct file_system_type *fs_type,
>  static struct dentry *rootfs_mount(struct file_system_type *fs_type,
>  	int flags, const char *dev_name, void *data)
>  {
> -	return mount_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super);
> +	static int once;
> +
> +	if (once)
> +		return ERR_PTR(-ENODEV);
> +	else
> +		once++;
> +
> +	return mount_nodev(fs_type, flags, data, ramfs_fill_super);
>  }

The patches do this in a couple of places.  The treatment of `once' is
obviously racy.  Probably it is unlikely to matter in these contexts,
but it does set a poor example.  And it's so trivially fixed with, for
example, test_and_set_bit() that I do think it's worth that change.



  reply	other threads:[~2013-07-15 21:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  2:06 Rob Landley
2013-07-15 21:01 ` Andrew Morton [this message]
2013-07-16  4:07   ` Rob Landley
2013-07-16  7:12     ` Ramkumar Ramachandra
2013-07-16 23:43       ` Rob Landley
2013-07-17  7:02         ` Ramkumar Ramachandra
2013-07-17 23:06   ` [PATCH 0/5] initmpfs v2: use tmpfs instead of ramfs for rootfs Andrew Morton
2013-07-18  0:15     ` Hugh Dickins
2013-07-18 23:17       ` Rob Landley
2013-07-18 23:59     ` H. Peter Anvin

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=20130715140135.0f896a584fec9f7861049b64@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    /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

all inboxes | Powered by JetHome®