linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@osdl.org, trond.myklebust@fys.uio.no
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	dhowells@redhat.com
Subject: [PATCH] NFS: Make NFS root work again
Date: Thu, 07 Jun 2007 17:40:03 +0100	[thread overview]
Message-ID: <20070607164003.24322.51086.stgit@warthog.cambridge.redhat.com> (raw)

Make NFS root work by creating a "/root" directory to satisfy the mount,
otherwise the path lookup for the mount fails with ENOENT.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 init/do_mounts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 46fe407..967b852 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -270,7 +270,10 @@ static void __init get_fs_names(char *page)
 
 static int __init do_mount_root(char *name, char *fs, int flags, void *data)
 {
-	int err = sys_mount(name, "/root", fs, flags, data);
+	int err;
+
+	sys_mkdir("/root", 0755);
+	err = sys_mount(name, "/root", fs, flags, data);
 	if (err)
 		return err;
 


             reply	other threads:[~2007-06-07 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 16:40 David Howells [this message]
2007-06-07 17:56 ` [PATCH] NFS: Make NFS root work again Peter Staubach
2007-06-07 19:53 ` Andrew Morton
2007-06-16 16:15 ` Andrew Morton
2007-06-16 16:47   ` Trond Myklebust
2007-06-17  3:26   ` Paul Mundt
2007-06-17 18:44   ` Andi Kleen
2007-06-18 11:09 ` David Howells

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=20070607164003.24322.51086.stgit@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=trond.myklebust@fys.uio.no \
    /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).