summaryrefslogtreecommitdiff
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
authorSripathi Kodi <sripathik@in.ibm.com>2010-03-25 15:41:54 +0300
committerEric Van Hensbergen <ericvh@gmail.com>2010-05-22 01:44:33 +0400
commit9b6533c9b331ddbba9a40c972d82222ecffbc359 (patch)
tree62d4f5ece3c2cbefc09197b386cac2cd4a6693ae /fs/9p/vfs_super.c
parentc56e4acf55c804cbeea0ddb696ef698c73d39826 (diff)
downloadlinux-9b6533c9b331ddbba9a40c972d82222ecffbc359.tar.xz
9p: VFS switches for 9p2000.L: VFS switches
Implements VFS switches for 9p2000.L protocol. Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 806da5d3b3a0..cc3fa8c3aab6 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -45,7 +45,7 @@
#include "v9fs_vfs.h"
#include "fid.h"
-static const struct super_operations v9fs_super_ops;
+static const struct super_operations v9fs_super_ops, v9fs_super_ops_dotl;
/**
* v9fs_set_super - set the superblock
@@ -76,7 +76,10 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
sb->s_blocksize_bits = fls(v9ses->maxdata - 1);
sb->s_blocksize = 1 << sb->s_blocksize_bits;
sb->s_magic = V9FS_MAGIC;
- sb->s_op = &v9fs_super_ops;
+ if (v9fs_proto_dotl(v9ses))
+ sb->s_op = &v9fs_super_ops_dotl;
+ else
+ sb->s_op = &v9fs_super_ops;
sb->s_bdi = &v9ses->bdi;
sb->s_flags = flags | MS_ACTIVE | MS_SYNCHRONOUS | MS_DIRSYNC |
@@ -222,6 +225,17 @@ static const struct super_operations v9fs_super_ops = {
.umount_begin = v9fs_umount_begin,
};
+static const struct super_operations v9fs_super_ops_dotl = {
+#ifdef CONFIG_9P_FSCACHE
+ .alloc_inode = v9fs_alloc_inode,
+ .destroy_inode = v9fs_destroy_inode,
+#endif
+ .statfs = simple_statfs,
+ .clear_inode = v9fs_clear_inode,
+ .show_options = generic_show_options,
+ .umount_begin = v9fs_umount_begin,
+};
+
struct file_system_type v9fs_fs_type = {
.name = "9p",
.get_sb = v9fs_get_sb,