Bryan Schumaker | 129d197 | 2012-07-16 16:39:13 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 Bryan Schumaker <bjschuma@netapp.com> |
| 3 | */ |
| 4 | #include <linux/init.h> |
| 5 | #include <linux/nfs_idmap.h> |
Bryan Schumaker | 466bfe7 | 2012-07-16 16:39:14 -0400 | [diff] [blame^] | 6 | #include <linux/nfs_fs.h> |
| 7 | #include "nfs4_fs.h" |
Bryan Schumaker | 129d197 | 2012-07-16 16:39:13 -0400 | [diff] [blame] | 8 | |
| 9 | int __init init_nfs_v4(void) |
| 10 | { |
| 11 | int err; |
| 12 | |
| 13 | err = nfs_idmap_init(); |
| 14 | if (err) |
| 15 | goto out; |
| 16 | |
Bryan Schumaker | 466bfe7 | 2012-07-16 16:39:14 -0400 | [diff] [blame^] | 17 | err = nfs4_register_sysctl(); |
| 18 | if (err) |
| 19 | goto out1; |
| 20 | |
Bryan Schumaker | 129d197 | 2012-07-16 16:39:13 -0400 | [diff] [blame] | 21 | return 0; |
Bryan Schumaker | 466bfe7 | 2012-07-16 16:39:14 -0400 | [diff] [blame^] | 22 | out1: |
| 23 | nfs_idmap_quit(); |
Bryan Schumaker | 129d197 | 2012-07-16 16:39:13 -0400 | [diff] [blame] | 24 | out: |
| 25 | return err; |
| 26 | } |
| 27 | |
| 28 | void __exit exit_nfs_v4(void) |
| 29 | { |
Bryan Schumaker | 466bfe7 | 2012-07-16 16:39:14 -0400 | [diff] [blame^] | 30 | nfs4_unregister_sysctl(); |
Bryan Schumaker | 129d197 | 2012-07-16 16:39:13 -0400 | [diff] [blame] | 31 | nfs_idmap_quit(); |
| 32 | } |