aboutsummaryrefslogtreecommitdiffstats
path: root/fs/kernfs/mount.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-02-03 14:09:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 18:52:48 -0500
commit6a7fed4eefddad48224f1c9d534b4e262f0897f6 (patch)
tree28c347ffd4cbb92146fde47768c396c088c44a95 /fs/kernfs/mount.c
parent90c07c895c87d38db100b6afcb686ab3ef0d6a64 (diff)
kernfs: implement kernfs_syscall_ops->remount_fs() and ->show_options()
Add two super_block related syscall callbacks ->remount_fs() and ->show_options() to kernfs_syscall_ops. These simply forward the matching super_operations. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs/mount.c')
-rw-r--r--fs/kernfs/mount.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index 0d6ce895a9ee..70cc6983d9b5 100644
--- a/fs/kernfs/mount.c
+++ b/fs/kernfs/mount.c
@@ -19,10 +19,33 @@
19 19
20struct kmem_cache *kernfs_node_cache; 20struct kmem_cache *kernfs_node_cache;
21 21
22static int kernfs_sop_remount_fs(struct super_block *sb, int *flags, char *data)
23{
24 struct kernfs_root *root = kernfs_info(sb)->root;
25 struct kernfs_syscall_ops *scops = root->syscall_ops;
26
27 if (scops && scops->remount_fs)
28 return scops->remount_fs(root, flags, data);
29 return 0;
30}
31
32static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry)
33{
34 struct kernfs_root *root = kernfs_root(dentry->d_fsdata);
35 struct kernfs_syscall_ops *scops = root->syscall_ops;
36
37 if (scops && scops->show_options)
38 return scops->show_options(sf, root);
39 return 0;
40}
41
22static const struct super_operations kernfs_sops = { 42static const struct super_operations kernfs_sops = {
23 .statfs = simple_statfs, 43 .statfs = simple_statfs,
24 .drop_inode = generic_delete_inode, 44 .drop_inode = generic_delete_inode,
25 .evict_inode = kernfs_evict_inode, 45 .evict_inode = kernfs_evict_inode,
46
47 .remount_fs = kernfs_sop_remount_fs,
48 .show_options = kernfs_sop_show_options,
26}; 49};
27 50
28static int kernfs_fill_super(struct super_block *sb) 51static int kernfs_fill_super(struct super_block *sb)