kernfs: Add support for always empty directories.
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 13 May 2015 21:09:29 +0000 (16:09 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 1 Jul 2015 15:36:43 +0000 (10:36 -0500)
commitea015218f2f7ace2dad9cedd21ed95bdba2886d7
tree9ab4dc58398a5ef08b174871a9cc587680261b65
parenteb6d38d5427b3ad42f5268da0f1dd31bb0af1264
kernfs: Add support for always empty directories.

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.

Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/kernfs/dir.c
fs/kernfs/inode.c
include/linux/kernfs.h