提交 bd0b1e95 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] knfsd: nfsd4: idmap initialization

Adopt standard kernel style by defining a no-op function instead of putting
ifdef's in the code where the function is called.
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 707d4ab7
......@@ -398,9 +398,7 @@ static int __init init_nfsd(void)
nfsd_export_init(); /* Exports table */
nfsd_lockd_init(); /* lockd->nfsd callbacks */
nfs4_state_init(); /* NFSv4 locking state */
#ifdef CONFIG_NFSD_V4
nfsd_idmap_init(); /* Name to ID mapping */
#endif /* CONFIG_NFSD_V4 */
if (proc_mkdir("fs/nfs", NULL)) {
struct proc_dir_entry *entry;
entry = create_proc_entry("fs/nfs/exports", 0, NULL);
......@@ -427,9 +425,7 @@ static void __exit exit_nfsd(void)
remove_proc_entry("fs/nfs", NULL);
nfsd_stat_shutdown();
nfsd_lockd_shutdown();
#ifdef CONFIG_NFSD_V4
nfsd_idmap_shutdown();
#endif /* CONFIG_NFSD_V4 */
unregister_filesystem(&nfsd_fs_type);
}
......
......@@ -43,8 +43,13 @@
/* XXX from linux/nfs_idmap.h */
#define IDMAP_NAMESZ 128
#ifdef CONFIG_NFSD_V4
void nfsd_idmap_init(void);
void nfsd_idmap_shutdown(void);
#else
static inline void nfsd_idmap_init(void) {};
static inline void nfsd_idmap_shutdown(void) {};
#endif
int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *);
int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册