OSDN Git Service

proc: Allow creating permanently empty directories that serve as mount points
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 11 May 2015 21:44:25 +0000 (16:44 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:10 +0000 (10:10 -0700)
commit594c980a9aea06a8243e41a59c1adbb39b21c46b
treef4365cdab741fa341449af2de202f87c3270bfc3
parent4419466202070be255b8b0214f0f151c33c59ed6
proc: Allow creating permanently empty directories that serve as mount points

commit eb6d38d5427b3ad42f5268da0f1dd31bb0af1264 upstream.

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.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/generic.c
fs/proc/inode.c
fs/proc/internal.h
fs/proc/root.c