]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] knfsd: nfsd4: idmap initialization
authorNeilBrown <neilb@cse.unsw.edu.au>
Fri, 24 Jun 2005 05:03:35 +0000 (22:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 24 Jun 2005 07:06:32 +0000 (00:06 -0700)
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: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfsctl.c
include/linux/nfsd_idmap.h

index 3d56531a7a03b8a2f93730808ced73a8fd07184f..3da43a3ed32c00b1eb2a7465b624dd34c825dd7e 100644 (file)
@@ -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);
 }
 
index 9bb7f30e923b1012d51e105a0fa4e6809a7ddd76..e82746fcad14551ab7aaf46157e3aba04c27e6b1 100644 (file)
 /* 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 *);