forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nfsd: only register cld pipe notifier when CONFIG_NFSD_V4 is enabled
Otherwise, we get a warning or error similar to this when building with CONFIG_NFSD_V4 disabled: ERROR: "nfsd4_cld_block" [fs/nfsd/nfsd.ko] undefined! Fix this by wrapping the calls to rpc_pipefs_notifier_register and ..._unregister in another function and providing no-op replacements when CONFIG_NFSD_V4 is disabled. Reported-by: Paul Gortmaker <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
- Loading branch information
Showing
4 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1137,7 +1137,7 @@ static int __init init_nfsd(void) | |
int retval; | ||
printk(KERN_INFO "Installing knfsd (copyright (C) 1996 [email protected]).\n"); | ||
|
||
retval = rpc_pipefs_notifier_register(&nfsd4_cld_block); | ||
retval = register_cld_notifier(); | ||
if (retval) | ||
return retval; | ||
retval = register_pernet_subsys(&nfsd_net_ops); | ||
|
@@ -1186,7 +1186,7 @@ static int __init init_nfsd(void) | |
out_unregister_pernet: | ||
unregister_pernet_subsys(&nfsd_net_ops); | ||
out_unregister_notifier: | ||
rpc_pipefs_notifier_unregister(&nfsd4_cld_block); | ||
unregister_cld_notifier(); | ||
return retval; | ||
} | ||
|
||
|
@@ -1203,7 +1203,7 @@ static void __exit exit_nfsd(void) | |
nfsd_fault_inject_cleanup(); | ||
unregister_filesystem(&nfsd_fs_type); | ||
unregister_pernet_subsys(&nfsd_net_ops); | ||
rpc_pipefs_notifier_unregister(&nfsd4_cld_block); | ||
unregister_cld_notifier(); | ||
} | ||
|
||
MODULE_AUTHOR("Olaf Kirch <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters