lkml.org 
[lkml]   [2003]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] fix CONFIG_DEVFS=y root=<number>
From
Based on a patch by Adam J. Richter <adam@yggdrasil.com> [1], this fixes
the problem since 2.5.47 with mounting a devfs=y system with root=<number>

sys_get_dents64 returns -EINVAL if there is not space for an entry, so
we need to activate the loop code to expand the buffer.

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=103762980207529&w=2
Tested with 2.5.53-um2


diff -Nru a/init/do_mounts.c b/init/do_mounts.c
--- a/init/do_mounts.c Sat Jan 4 00:14:34 2003
+++ b/init/do_mounts.c Sat Jan 4 00:14:34 2003
@@ -333,7 +333,7 @@
for (bytes = 0, p = buf; bytes < len; bytes += n, p+=n) {
n = sys_getdents64(fd, p, len - bytes);
if (n < 0)
- return -1;
+ return n;
if (n == 0)
return bytes;
}
@@ -361,7 +361,7 @@
return p;
}
kfree(p);
- if (n < 0)
+ if (n < 0 && n != -EINVAL)
break;
}
close(fd);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.074 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site