aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-07 21:22:19 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-07 21:22:19 +0000
commitacecc47261567816ace517333ae445c98d4a304d (patch)
treefbbdad0e3c622db3d4ef95885f07ef7cb62dbdbb
parente6b9dfa96730d9cedfb1f22a4bc0f3bcb6949ea6 (diff)
downloadbusybox-w32-acecc47261567816ace517333ae445c98d4a304d.tar.gz
busybox-w32-acecc47261567816ace517333ae445c98d4a304d.tar.bz2
busybox-w32-acecc47261567816ace517333ae445c98d4a304d.zip
Add in my fix for 2.4.x kernels so /proc/mounts will not have useless
deg entries which break mount, df, and friends. Renamed WillThisGoIntoTheKernel to avoid any confision. -Erik
-rw-r--r--examples/kernel-patches/2.4.x_mount_patch66
-rw-r--r--examples/kernel-patches/Will_devps_GoIntoTheKernel (renamed from examples/kernel-patches/WillThisGoIntoTheKernel)0
2 files changed, 66 insertions, 0 deletions
diff --git a/examples/kernel-patches/2.4.x_mount_patch b/examples/kernel-patches/2.4.x_mount_patch
new file mode 100644
index 000000000..91f5262c1
--- /dev/null
+++ b/examples/kernel-patches/2.4.x_mount_patch
@@ -0,0 +1,66 @@
1On Sat Jul 01, 2000 at 12:04:36PM -0400, Alexander Viro wrote:
2>
3> Try to trace the path from their roots to absolute root(s)... They simply
4> should not be in the output - that's a debugging stuff and I have no
5> problems with removing it from /proc/mounts. No heuristics needed - we
6> can pass NULL as dev_name in kern_mount() and check for NULL ->mnt_devname
7> in get_filesystem_info(). I'll do that as soon as threading patches will
8> be over (hopefully RSN - they went to Linus).
9>
10
11Ok, cool. So something like then? I kept in the filter for FS_NOMOUNT
12filesystems, as I assume those should never show up in /proc/mounts, and added
13that filter to the /proc/filesystems listing as well.
14
15 -Erik
16
17--
18Erik B. Andersen Web: http://www.xmission.com/~andersen/
19 email: andersee@debian.org
20--This message was written using 73% post-consumer electrons--
21
22
23--- fs/super.c.virgin Wed Jun 28 22:42:35 2000
24+++ fs/super.c Mon Jul 3 12:07:07 2000
25@@ -251,6 +251,10 @@ int get_filesystem_list(char * buf)
26 read_lock(&file_systems_lock);
27 tmp = file_systems;
28 while (tmp && len < PAGE_SIZE - 80) {
29+ /* Filter out any filesystems that are marked as FS_NOMOUNT.
30+ * User space doesn't need to know or care about them */
31+ if (tmp->fs_flags & FS_NOMOUNT)
32+ continue;
33 len += sprintf(buf+len, "%s\t%s\n",
34 (tmp->fs_flags & FS_REQUIRES_DEV) ? "" : "nodev",
35 tmp->name);
36@@ -443,6 +447,16 @@ int get_filesystem_info( char *buf )
37 path = d_path(tmp->mnt_root, tmp, buffer, PAGE_SIZE);
38 if (!path)
39 continue;
40+ /* Filter out any filesystems that are marked as FS_NOMOUNT.
41+ * User space doesn't need to know or care about them */
42+ if (tmp->mnt_sb->s_type->fs_flags & FS_NOMOUNT)
43+ continue;
44+ /* kern_mount() allows the kernel to mount internal-use-only
45+ * filesystems, and marks then with ->mnt_devname==NULL, so
46+ * filter out those here */
47+ if (tmp->mnt_devname == NULL)
48+ continue;
49+
50 len += sprintf( buf + len, "%s %s %s %s",
51 tmp->mnt_devname, path,
52 tmp->mnt_sb->s_type->name,
53@@ -895,7 +909,7 @@ struct vfsmount *kern_mount(struct file_
54 put_unnamed_dev(dev);
55 return ERR_PTR(-EINVAL);
56 }
57- mnt = add_vfsmnt(sb, sb->s_root, sb->s_root, NULL, "none", type->name);
58+ mnt = add_vfsmnt(sb, sb->s_root, sb->s_root, NULL, NULL, type->name);
59 if (!mnt) {
60 kill_super(sb, 0);
61 return ERR_PTR(-ENOMEM);
62
63-
64To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
65the body of a message to majordomo@vger.rutgers.edu
66Please read the FAQ at http://www.tux.org/lkml/
diff --git a/examples/kernel-patches/WillThisGoIntoTheKernel b/examples/kernel-patches/Will_devps_GoIntoTheKernel
index 33ee8b47e..33ee8b47e 100644
--- a/examples/kernel-patches/WillThisGoIntoTheKernel
+++ b/examples/kernel-patches/Will_devps_GoIntoTheKernel