aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfsctl.c4
-rw-r--r--include/linux/nfsd_idmap.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 3d56531a7a03..3da43a3ed32c 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -398,9 +398,7 @@ static int __init init_nfsd(void)
398 nfsd_export_init(); /* Exports table */ 398 nfsd_export_init(); /* Exports table */
399 nfsd_lockd_init(); /* lockd->nfsd callbacks */ 399 nfsd_lockd_init(); /* lockd->nfsd callbacks */
400 nfs4_state_init(); /* NFSv4 locking state */ 400 nfs4_state_init(); /* NFSv4 locking state */
401#ifdef CONFIG_NFSD_V4
402 nfsd_idmap_init(); /* Name to ID mapping */ 401 nfsd_idmap_init(); /* Name to ID mapping */
403#endif /* CONFIG_NFSD_V4 */
404 if (proc_mkdir("fs/nfs", NULL)) { 402 if (proc_mkdir("fs/nfs", NULL)) {
405 struct proc_dir_entry *entry; 403 struct proc_dir_entry *entry;
406 entry = create_proc_entry("fs/nfs/exports", 0, NULL); 404 entry = create_proc_entry("fs/nfs/exports", 0, NULL);
@@ -427,9 +425,7 @@ static void __exit exit_nfsd(void)
427 remove_proc_entry("fs/nfs", NULL); 425 remove_proc_entry("fs/nfs", NULL);
428 nfsd_stat_shutdown(); 426 nfsd_stat_shutdown();
429 nfsd_lockd_shutdown(); 427 nfsd_lockd_shutdown();
430#ifdef CONFIG_NFSD_V4
431 nfsd_idmap_shutdown(); 428 nfsd_idmap_shutdown();
432#endif /* CONFIG_NFSD_V4 */
433 unregister_filesystem(&nfsd_fs_type); 429 unregister_filesystem(&nfsd_fs_type);
434} 430}
435 431
diff --git a/include/linux/nfsd_idmap.h b/include/linux/nfsd_idmap.h
index 9bb7f30e923b..e82746fcad14 100644
--- a/include/linux/nfsd_idmap.h
+++ b/include/linux/nfsd_idmap.h
@@ -43,8 +43,13 @@
43/* XXX from linux/nfs_idmap.h */ 43/* XXX from linux/nfs_idmap.h */
44#define IDMAP_NAMESZ 128 44#define IDMAP_NAMESZ 128
45 45
46#ifdef CONFIG_NFSD_V4
46void nfsd_idmap_init(void); 47void nfsd_idmap_init(void);
47void nfsd_idmap_shutdown(void); 48void nfsd_idmap_shutdown(void);
49#else
50static inline void nfsd_idmap_init(void) {};
51static inline void nfsd_idmap_shutdown(void) {};
52#endif
48 53
49int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); 54int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *);
50int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *); 55int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *);