aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-05-09 16:54:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-21 13:10:00 -0400
commitc2f633b99857d27333de18f53d123a180672c52b (patch)
tree5df2d42d37538cd7c1abed60c471d75fdd320e13 /include/linux/fs.h
parent5cf9896dc5c72a6c68c36140568b755f697f7760 (diff)
fs: Add helper functions for permanently empty directories.
commit fbabfd0f4ee2e8847bf56edf481249ad1bb8c44d upstream. To ensure it is safe to mount proc and sysfs I need to check if filesystems that are mounted on top of them are mounted on truly empty directories. Given that some directories can gain entries over time, knowing that a directory is empty right now is insufficient. Therefore add supporting infrastructure for permantently empty directories that proc and sysfs can use when they create mount points for filesystems and fs_fully_visible can use to test for permanently empty directories to ensure that nothing will be gained by mounting a fresh copy of proc or sysfs. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 35ec87e490b1..0d5ae7d5dc53 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2780,6 +2780,8 @@ extern struct dentry *simple_lookup(struct inode *, struct dentry *, unsigned in
2780extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); 2780extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
2781extern const struct file_operations simple_dir_operations; 2781extern const struct file_operations simple_dir_operations;
2782extern const struct inode_operations simple_dir_inode_operations; 2782extern const struct inode_operations simple_dir_inode_operations;
2783extern void make_empty_dir_inode(struct inode *inode);
2784extern bool is_empty_dir_inode(struct inode *inode);
2783struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 2785struct tree_descr { char *name; const struct file_operations *ops; int mode; };
2784struct dentry *d_alloc_name(struct dentry *, const char *); 2786struct dentry *d_alloc_name(struct dentry *, const char *);
2785extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); 2787extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *);