aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/hostfs/hostfs_kern.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 2b9b35733aac..d0549cb4fb23 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -11,6 +11,7 @@
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/pagemap.h> 12#include <linux/pagemap.h>
13#include <linux/statfs.h> 13#include <linux/statfs.h>
14#include <linux/seq_file.h>
14#include "hostfs.h" 15#include "hostfs.h"
15#include "init.h" 16#include "init.h"
16#include "kern.h" 17#include "kern.h"
@@ -322,12 +323,25 @@ static void hostfs_destroy_inode(struct inode *inode)
322 kfree(HOSTFS_I(inode)); 323 kfree(HOSTFS_I(inode));
323} 324}
324 325
326static int hostfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
327{
328 struct inode *root = vfs->mnt_sb->s_root->d_inode;
329 const char *root_path = HOSTFS_I(root)->host_filename;
330 size_t offset = strlen(root_ino) + 1;
331
332 if (strlen(root_path) > offset)
333 seq_printf(seq, ",%s", root_path + offset);
334
335 return 0;
336}
337
325static const struct super_operations hostfs_sbops = { 338static const struct super_operations hostfs_sbops = {
326 .alloc_inode = hostfs_alloc_inode, 339 .alloc_inode = hostfs_alloc_inode,
327 .drop_inode = generic_delete_inode, 340 .drop_inode = generic_delete_inode,
328 .delete_inode = hostfs_delete_inode, 341 .delete_inode = hostfs_delete_inode,
329 .destroy_inode = hostfs_destroy_inode, 342 .destroy_inode = hostfs_destroy_inode,
330 .statfs = hostfs_statfs, 343 .statfs = hostfs_statfs,
344 .show_options = hostfs_show_options,
331}; 345};
332 346
333int hostfs_readdir(struct file *file, void *ent, filldir_t filldir) 347int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)