diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-11 17:44:25 -0400 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2015-07-01 11:36:41 -0400 |
commit | eb6d38d5427b3ad42f5268da0f1dd31bb0af1264 (patch) | |
tree | 1fb54abb73c369444d6b84f12e3eff670c0a5d64 /fs/proc/root.c | |
parent | f9bd6733d3f11e24f3949becf277507d422ee1eb (diff) |
proc: Allow creating permanently empty directories that serve as mount points
Add a new function proc_create_mount_point that when used to creates a
directory that can not be added to.
Add a new function is_empty_pde to test if a function is a mount
point.
Update the code to use make_empty_dir_inode when reporting
a permanently empty directory to the vfs.
Update the code to not allow adding to permanently empty directories.
Update /proc/openprom and /proc/fs/nfsd to be permanently empty directories.
Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/proc/root.c')
-rw-r--r-- | fs/proc/root.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index 64e1ab64bde6..68feb0f70e63 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -179,10 +179,10 @@ void __init proc_root_init(void) | |||
179 | #endif | 179 | #endif |
180 | proc_mkdir("fs", NULL); | 180 | proc_mkdir("fs", NULL); |
181 | proc_mkdir("driver", NULL); | 181 | proc_mkdir("driver", NULL); |
182 | proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */ | 182 | proc_create_mount_point("fs/nfsd"); /* somewhere for the nfsd filesystem to be mounted */ |
183 | #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE) | 183 | #if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE) |
184 | /* just give it a mountpoint */ | 184 | /* just give it a mountpoint */ |
185 | proc_mkdir("openprom", NULL); | 185 | proc_create_mount_point("openprom"); |
186 | #endif | 186 | #endif |
187 | proc_tty_init(); | 187 | proc_tty_init(); |
188 | proc_mkdir("bus", NULL); | 188 | proc_mkdir("bus", NULL); |