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/super.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/super.c')
-rw-r--r-- | fs/nfs/super.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index a5f9fb3bfdc..a275d19ae51 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -298,7 +298,7 @@ struct file_system_type nfs_xdev_fs_type = { | |||
298 | .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, | 298 | .fs_flags = FS_RENAME_DOES_D_MOVE|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, |
299 | }; | 299 | }; |
300 | 300 | ||
301 | static const struct super_operations nfs_sops = { | 301 | const struct super_operations nfs_sops = { |
302 | .alloc_inode = nfs_alloc_inode, | 302 | .alloc_inode = nfs_alloc_inode, |
303 | .destroy_inode = nfs_destroy_inode, | 303 | .destroy_inode = nfs_destroy_inode, |
304 | .write_inode = nfs_write_inode, | 304 | .write_inode = nfs_write_inode, |
@@ -2105,10 +2105,12 @@ void nfs_fill_super(struct super_block *sb, struct nfs_mount_info *mount_info) | |||
2105 | 2105 | ||
2106 | sb->s_blocksize_bits = 0; | 2106 | sb->s_blocksize_bits = 0; |
2107 | sb->s_blocksize = 0; | 2107 | sb->s_blocksize = 0; |
2108 | if (data->bsize) | 2108 | sb->s_xattr = server->nfs_client->cl_nfs_mod->xattr; |
2109 | sb->s_op = server->nfs_client->cl_nfs_mod->sops; | ||
2110 | if (data && data->bsize) | ||
2109 | sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits); | 2111 | sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits); |
2110 | 2112 | ||
2111 | if (server->nfs_client->rpc_ops->version == 3) { | 2113 | if (server->nfs_client->rpc_ops->version != 2) { |
2112 | /* The VFS shouldn't apply the umask to mode bits. We will do | 2114 | /* The VFS shouldn't apply the umask to mode bits. We will do |
2113 | * so ourselves when necessary. | 2115 | * so ourselves when necessary. |
2114 | */ | 2116 | */ |
@@ -2116,7 +2118,6 @@ void nfs_fill_super(struct super_block *sb, struct nfs_mount_info *mount_info) | |||
2116 | sb->s_time_gran = 1; | 2118 | sb->s_time_gran = 1; |
2117 | } | 2119 | } |
2118 | 2120 | ||
2119 | sb->s_op = &nfs_sops; | ||
2120 | nfs_initialise_sb(sb); | 2121 | nfs_initialise_sb(sb); |
2121 | } | 2122 | } |
2122 | 2123 | ||