aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2012-05-05 17:06:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-21 09:40:03 -0700
commit2743d7a6612be25a93c009a17f2a6d5db0f6fc36 (patch)
tree23b89658717f2f0acf6532bfe6d434b1e3478392 /init/do_mounts.c
parent6e29cea334bf13fcb19f20cc80b65f9a1f2f329e (diff)
downloadkernel_samsung_smdk4412-2743d7a6612be25a93c009a17f2a6d5db0f6fc36.zip
kernel_samsung_smdk4412-2743d7a6612be25a93c009a17f2a6d5db0f6fc36.tar.gz
kernel_samsung_smdk4412-2743d7a6612be25a93c009a17f2a6d5db0f6fc36.tar.bz2
init: don't try mounting device as nfs root unless type fully matches
commit 377485f6244af255b04d662cf19cddbbc4ae4310 upstream. Currently, we'll try mounting any device who's major device number is UNNAMED_MAJOR as NFS root. This would happen for non-NFS devices as well (such as 9p devices) but it wouldn't cause any issues since mounting the device as NFS would fail quickly and the code proceeded to doing the proper mount: [ 101.522716] VFS: Unable to mount root fs via NFS, trying floppy. [ 101.534499] VFS: Mounted root (9p filesystem) on device 0:18. Commit 6829a048102a ("NFS: Retry mounting NFSROOT") introduced retries when mounting NFS root, which means that now we don't immediately fail and instead it takes an additional 90+ seconds until we stop retrying, which has revealed the issue this patch fixes. This meant that it would take an additional 90 seconds to boot when we're not using a device type which gets detected in order before NFS. This patch modifies the NFS type check to require device type to be 'Root_NFS' instead of requiring the device to have an UNNAMED_MAJOR major. This makes boot process cleaner since we now won't go through the NFS mounting code at all when the device isn't an NFS root ("/dev/nfs"). Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index ef6478f..8959eb3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -432,7 +432,7 @@ void __init change_floppy(char *fmt, ...)
void __init mount_root(void)
{
#ifdef CONFIG_ROOT_NFS
- if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
+ if (ROOT_DEV == Root_NFS) {
if (mount_nfs_root())
return;