Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: 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>

authored by

NeilBrown and committed by
Linus Torvalds
bd0b1e95 707d4ab7

+5 -4
-4
fs/nfsd/nfsctl.c
··· 398 398 nfsd_export_init(); /* Exports table */ 399 399 nfsd_lockd_init(); /* lockd->nfsd callbacks */ 400 400 nfs4_state_init(); /* NFSv4 locking state */ 401 - #ifdef CONFIG_NFSD_V4 402 401 nfsd_idmap_init(); /* Name to ID mapping */ 403 - #endif /* CONFIG_NFSD_V4 */ 404 402 if (proc_mkdir("fs/nfs", NULL)) { 405 403 struct proc_dir_entry *entry; 406 404 entry = create_proc_entry("fs/nfs/exports", 0, NULL); ··· 425 427 remove_proc_entry("fs/nfs", NULL); 426 428 nfsd_stat_shutdown(); 427 429 nfsd_lockd_shutdown(); 428 - #ifdef CONFIG_NFSD_V4 429 430 nfsd_idmap_shutdown(); 430 - #endif /* CONFIG_NFSD_V4 */ 431 431 unregister_filesystem(&nfsd_fs_type); 432 432 } 433 433
+5
include/linux/nfsd_idmap.h
··· 43 43 /* XXX from linux/nfs_idmap.h */ 44 44 #define IDMAP_NAMESZ 128 45 45 46 + #ifdef CONFIG_NFSD_V4 46 47 void nfsd_idmap_init(void); 47 48 void nfsd_idmap_shutdown(void); 49 + #else 50 + static inline void nfsd_idmap_init(void) {}; 51 + static inline void nfsd_idmap_shutdown(void) {}; 52 + #endif 48 53 49 54 int nfsd_map_name_to_uid(struct svc_rqst *, const char *, size_t, __u32 *); 50 55 int nfsd_map_name_to_gid(struct svc_rqst *, const char *, size_t, __u32 *);