aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-08-22 20:06:07 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:30 -0400
commit7d4e2747a0412583526a162fbbd6edeeafcceb08 (patch)
tree756180b37a02b504998c646ff027652f80e10bab /fs/nfs/super.c
parent770bfad846ab6628444428467b11fa6773ae9ea1 (diff)
NFS: Fix up split of fs/nfs/inode.c
Fix ups for the splitting of the superblock stuff out of fs/nfs/inode.c, including: (*) Move the callback tcpport module param into callback.c. (*) Move the idmap cache timeout module param into idmap.c. (*) Changes to internal.h: (*) namespace-nfs4.c was renamed to nfs4namespace.c. (*) nfs_stat_to_errno() is in nfs2xdr.c, not nfs4xdr.c. (*) nfs4xdr.c is contingent on CONFIG_NFS_V4. (*) nfs4_path() is only uses if CONFIG_NFS_V4 is set. Plus also: (*) The sec_flavours[] table should really be const. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 06c321beacfe..63497345806b 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -187,40 +187,6 @@ static struct super_operations nfs4_sops = {
187}; 187};
188#endif 188#endif
189 189
190#ifdef CONFIG_NFS_V4
191static const int nfs_set_port_min = 0;
192static const int nfs_set_port_max = 65535;
193
194static int param_set_port(const char *val, struct kernel_param *kp)
195{
196 char *endp;
197 int num = simple_strtol(val, &endp, 0);
198 if (endp == val || *endp || num < nfs_set_port_min || num > nfs_set_port_max)
199 return -EINVAL;
200 *((int *)kp->arg) = num;
201 return 0;
202}
203
204module_param_call(callback_tcpport, param_set_port, param_get_int,
205 &nfs_callback_set_tcpport, 0644);
206#endif
207
208#ifdef CONFIG_NFS_V4
209static int param_set_idmap_timeout(const char *val, struct kernel_param *kp)
210{
211 char *endp;
212 int num = simple_strtol(val, &endp, 0);
213 int jif = num * HZ;
214 if (endp == val || *endp || num < 0 || jif < num)
215 return -EINVAL;
216 *((int *)kp->arg) = jif;
217 return 0;
218}
219
220module_param_call(idmap_cache_timeout, param_set_idmap_timeout, param_get_int,
221 &nfs_idmap_cache_timeout, 0644);
222#endif
223
224static struct shrinker *acl_shrinker; 190static struct shrinker *acl_shrinker;
225 191
226/* 192/*
@@ -328,9 +294,12 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)
328 294
329} 295}
330 296
297/*
298 * Map the security flavour number to a name
299 */
331static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour) 300static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour)
332{ 301{
333 static struct { 302 static const struct {
334 rpc_authflavor_t flavour; 303 rpc_authflavor_t flavour;
335 const char *str; 304 const char *str;
336 } sec_flavours[] = { 305 } sec_flavours[] = {
@@ -1368,7 +1337,6 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
1368 } 1337 }
1369 1338
1370 s = sget(fs_type, nfs4_compare_super, nfs_set_super, server); 1339 s = sget(fs_type, nfs4_compare_super, nfs_set_super, server);
1371
1372 if (IS_ERR(s)) { 1340 if (IS_ERR(s)) {
1373 error = PTR_ERR(s); 1341 error = PTR_ERR(s);
1374 goto out_free; 1342 goto out_free;