diff options
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 02ded7cfbdcf..07b9a065e9da 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/nfsd/stats.h> | 31 | #include <linux/nfsd/stats.h> |
32 | #include <linux/nfsd/cache.h> | 32 | #include <linux/nfsd/cache.h> |
33 | #include <linux/lockd/bind.h> | 33 | #include <linux/lockd/bind.h> |
34 | #include <linux/nfsacl.h> | ||
34 | 35 | ||
35 | #define NFSDDBG_FACILITY NFSDDBG_SVC | 36 | #define NFSDDBG_FACILITY NFSDDBG_SVC |
36 | 37 | ||
@@ -94,7 +95,7 @@ nfsd_svc(unsigned short port, int nrservs) | |||
94 | error = nfsd_racache_init(2*nrservs); | 95 | error = nfsd_racache_init(2*nrservs); |
95 | if (error<0) | 96 | if (error<0) |
96 | goto out; | 97 | goto out; |
97 | error = nfs4_state_init(); | 98 | error = nfs4_state_start(); |
98 | if (error<0) | 99 | if (error<0) |
99 | goto out; | 100 | goto out; |
100 | if (!nfsd_serv) { | 101 | if (!nfsd_serv) { |
@@ -362,6 +363,32 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) | |||
362 | return 1; | 363 | return 1; |
363 | } | 364 | } |
364 | 365 | ||
366 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | ||
367 | static struct svc_stat nfsd_acl_svcstats; | ||
368 | static struct svc_version * nfsd_acl_version[] = { | ||
369 | [2] = &nfsd_acl_version2, | ||
370 | [3] = &nfsd_acl_version3, | ||
371 | }; | ||
372 | |||
373 | #define NFSD_ACL_NRVERS (sizeof(nfsd_acl_version)/sizeof(nfsd_acl_version[0])) | ||
374 | static struct svc_program nfsd_acl_program = { | ||
375 | .pg_prog = NFS_ACL_PROGRAM, | ||
376 | .pg_nvers = NFSD_ACL_NRVERS, | ||
377 | .pg_vers = nfsd_acl_version, | ||
378 | .pg_name = "nfsd", | ||
379 | .pg_class = "nfsd", | ||
380 | .pg_stats = &nfsd_acl_svcstats, | ||
381 | }; | ||
382 | |||
383 | static struct svc_stat nfsd_acl_svcstats = { | ||
384 | .program = &nfsd_acl_program, | ||
385 | }; | ||
386 | |||
387 | #define nfsd_acl_program_p &nfsd_acl_program | ||
388 | #else | ||
389 | #define nfsd_acl_program_p NULL | ||
390 | #endif /* defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) */ | ||
391 | |||
365 | extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4; | 392 | extern struct svc_version nfsd_version2, nfsd_version3, nfsd_version4; |
366 | 393 | ||
367 | static struct svc_version * nfsd_version[] = { | 394 | static struct svc_version * nfsd_version[] = { |
@@ -376,6 +403,7 @@ static struct svc_version * nfsd_version[] = { | |||
376 | 403 | ||
377 | #define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0])) | 404 | #define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0])) |
378 | struct svc_program nfsd_program = { | 405 | struct svc_program nfsd_program = { |
406 | .pg_next = nfsd_acl_program_p, | ||
379 | .pg_prog = NFS_PROGRAM, /* program number */ | 407 | .pg_prog = NFS_PROGRAM, /* program number */ |
380 | .pg_nvers = NFSD_NRVERS, /* nr of entries in nfsd_version */ | 408 | .pg_nvers = NFSD_NRVERS, /* nr of entries in nfsd_version */ |
381 | .pg_vers = nfsd_version, /* version table */ | 409 | .pg_vers = nfsd_version, /* version table */ |