diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-07-30 16:05:20 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-30 19:06:05 -0400 |
commit | 6a74490dca897471a994a542fc7c5a469b48b46b (patch) | |
tree | d1ae8565c3e51bff590858b2f681b2c35700f55f /fs/nfs/nfs4super.c | |
parent | 1179acc6a3e260bc4edc74fa94f6c7908290eaec (diff) |
NFS: Pass super operations and xattr handlers in the nfs_subversion
I can set all variables in the nfs_fill_super() function, allowing me to
remove the nfs4_fill_super() function.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4super.c')
-rw-r--r-- | fs/nfs/nfs4super.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index a62836256665..c70e1730755c 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c | |||
@@ -71,26 +71,11 @@ struct nfs_subversion nfs_v4 = { | |||
71 | .nfs_fs = &nfs4_fs_type, | 71 | .nfs_fs = &nfs4_fs_type, |
72 | .rpc_vers = &nfs_version4, | 72 | .rpc_vers = &nfs_version4, |
73 | .rpc_ops = &nfs_v4_clientops, | 73 | .rpc_ops = &nfs_v4_clientops, |
74 | .sops = &nfs4_sops, | ||
75 | .xattr = nfs4_xattr_handlers, | ||
74 | }; | 76 | }; |
75 | 77 | ||
76 | /* | 78 | /* |
77 | * Set up an NFS4 superblock | ||
78 | */ | ||
79 | static void nfs4_fill_super(struct super_block *sb, | ||
80 | struct nfs_mount_info *mount_info) | ||
81 | { | ||
82 | sb->s_time_gran = 1; | ||
83 | sb->s_op = &nfs4_sops; | ||
84 | /* | ||
85 | * The VFS shouldn't apply the umask to mode bits. We will do | ||
86 | * so ourselves when necessary. | ||
87 | */ | ||
88 | sb->s_flags |= MS_POSIXACL; | ||
89 | sb->s_xattr = nfs4_xattr_handlers; | ||
90 | nfs_initialise_sb(sb); | ||
91 | } | ||
92 | |||
93 | /* | ||
94 | * Get the superblock for the NFS4 root partition | 79 | * Get the superblock for the NFS4 root partition |
95 | */ | 80 | */ |
96 | static struct dentry * | 81 | static struct dentry * |
@@ -101,7 +86,6 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | |||
101 | struct nfs_server *server; | 86 | struct nfs_server *server; |
102 | struct dentry *mntroot = ERR_PTR(-ENOMEM); | 87 | struct dentry *mntroot = ERR_PTR(-ENOMEM); |
103 | 88 | ||
104 | mount_info->fill_super = nfs4_fill_super; | ||
105 | mount_info->set_security = nfs_set_sb_security; | 89 | mount_info->set_security = nfs_set_sb_security; |
106 | 90 | ||
107 | /* Get a volume representation */ | 91 | /* Get a volume representation */ |
@@ -236,8 +220,6 @@ struct dentry *nfs4_try_mount(int flags, const char *dev_name, | |||
236 | 220 | ||
237 | dfprintk(MOUNT, "--> nfs4_try_mount()\n"); | 221 | dfprintk(MOUNT, "--> nfs4_try_mount()\n"); |
238 | 222 | ||
239 | mount_info->fill_super = nfs4_fill_super; | ||
240 | |||
241 | export_path = data->nfs_server.export_path; | 223 | export_path = data->nfs_server.export_path; |
242 | data->nfs_server.export_path = "/"; | 224 | data->nfs_server.export_path = "/"; |
243 | root_mnt = nfs_do_root_mount(&nfs4_remote_fs_type, flags, mount_info, | 225 | root_mnt = nfs_do_root_mount(&nfs4_remote_fs_type, flags, mount_info, |
@@ -257,7 +239,7 @@ nfs4_remote_referral_mount(struct file_system_type *fs_type, int flags, | |||
257 | const char *dev_name, void *raw_data) | 239 | const char *dev_name, void *raw_data) |
258 | { | 240 | { |
259 | struct nfs_mount_info mount_info = { | 241 | struct nfs_mount_info mount_info = { |
260 | .fill_super = nfs4_fill_super, | 242 | .fill_super = nfs_fill_super, |
261 | .set_security = nfs_clone_sb_security, | 243 | .set_security = nfs_clone_sb_security, |
262 | .cloned = raw_data, | 244 | .cloned = raw_data, |
263 | }; | 245 | }; |