kernfs: Add support for always empty directories.

commit ea015218f2 upstream.

Add a new function kernfs_create_empty_dir that can be used to create
directory that can not be modified.

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.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
Eric W. Biederman 2015-05-13 16:09:29 -05:00 • committed by Luis Henriques
commit 4e6378f17c
3 changed files with 42 additions and 1 deletions