Re: [PATCH] NFS: Make NFS root work again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Howells wrote:
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@xxxxxxxxxx>
---

 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;

It seems to me that if sys_mkdir() fails with anything other other
than EEXISTS, then sys_mount() will continue to fail.  Is this
something that we care about?

      ps
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux