diff options
author | Tejun Heo <tj@kernel.org> | 2014-02-03 14:09:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 15:52:48 -0800 |
commit | 6a7fed4eefddad48224f1c9d534b4e262f0897f6 (patch) | |
tree | 28c347ffd4cbb92146fde47768c396c088c44a95 /fs/kernfs/mount.c | |
parent | 90c07c895c87d38db100b6afcb686ab3ef0d6a64 (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.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 0d6ce895a9e..70cc6983d9b 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -19,10 +19,33 @@ struct kmem_cache *kernfs_node_cache; +static int kernfs_sop_remount_fs(struct super_block *sb, int *flags, char *data) +{ + struct kernfs_root *root = kernfs_info(sb)->root; + struct kernfs_syscall_ops *scops = root->syscall_ops; + + if (scops && scops->remount_fs) + return scops->remount_fs(root, flags, data); + return 0; +} + +static int kernfs_sop_show_options(struct seq_file *sf, struct dentry *dentry) +{ + struct kernfs_root *root = kernfs_root(dentry->d_fsdata); + struct kernfs_syscall_ops *scops = root->syscall_ops; + + if (scops && scops->show_options) + return scops->show_options(sf, root); + return 0; +} + static const struct super_operations kernfs_sops = { .statfs = simple_statfs, .drop_inode = generic_delete_inode, .evict_inode = kernfs_evict_inode, + + .remount_fs = kernfs_sop_remount_fs, + .show_options = kernfs_sop_show_options, }; static int kernfs_fill_super(struct super_block *sb) |