diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 30fc505b7ef1..6c1d738418f1 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -1033,22 +1033,31 @@ init_cifs(void) | |||
1033 | if (rc) | 1033 | if (rc) |
1034 | goto out_destroy_mids; | 1034 | goto out_destroy_mids; |
1035 | 1035 | ||
1036 | rc = register_filesystem(&cifs_fs_type); | ||
1037 | if (rc) | ||
1038 | goto out_destroy_request_bufs; | ||
1039 | #ifdef CONFIG_CIFS_UPCALL | 1036 | #ifdef CONFIG_CIFS_UPCALL |
1040 | rc = register_key_type(&cifs_spnego_key_type); | 1037 | rc = register_key_type(&cifs_spnego_key_type); |
1041 | if (rc) | 1038 | if (rc) |
1042 | goto out_unregister_filesystem; | 1039 | goto out_destroy_request_bufs; |
1043 | #endif | 1040 | #endif /* CONFIG_CIFS_UPCALL */ |
1041 | |||
1042 | #ifdef CONFIG_CIFS_ACL | ||
1043 | rc = init_cifs_idmap(); | ||
1044 | if (rc) | ||
1045 | goto out_destroy_request_bufs; | ||
1046 | #endif /* CONFIG_CIFS_ACL */ | ||
1047 | |||
1048 | rc = register_filesystem(&cifs_fs_type); | ||
1049 | if (rc) | ||
1050 | goto out_destroy_request_bufs; | ||
1044 | 1051 | ||
1045 | return 0; | 1052 | return 0; |
1046 | 1053 | ||
1054 | out_destroy_request_bufs: | ||
1055 | #ifdef CONFIG_CIFS_ACL | ||
1056 | exit_cifs_idmap(); | ||
1057 | #endif | ||
1047 | #ifdef CONFIG_CIFS_UPCALL | 1058 | #ifdef CONFIG_CIFS_UPCALL |
1048 | out_unregister_filesystem: | 1059 | unregister_key_type(&cifs_spnego_key_type); |
1049 | unregister_filesystem(&cifs_fs_type); | ||
1050 | #endif | 1060 | #endif |
1051 | out_destroy_request_bufs: | ||
1052 | cifs_destroy_request_bufs(); | 1061 | cifs_destroy_request_bufs(); |
1053 | out_destroy_mids: | 1062 | out_destroy_mids: |
1054 | cifs_destroy_mids(); | 1063 | cifs_destroy_mids(); |
@@ -1070,6 +1079,10 @@ exit_cifs(void) | |||
1070 | #ifdef CONFIG_CIFS_DFS_UPCALL | 1079 | #ifdef CONFIG_CIFS_DFS_UPCALL |
1071 | cifs_dfs_release_automount_timer(); | 1080 | cifs_dfs_release_automount_timer(); |
1072 | #endif | 1081 | #endif |
1082 | #ifdef CONFIG_CIFS_ACL | ||
1083 | cifs_destroy_idmaptrees(); | ||
1084 | exit_cifs_idmap(); | ||
1085 | #endif | ||
1073 | #ifdef CONFIG_CIFS_UPCALL | 1086 | #ifdef CONFIG_CIFS_UPCALL |
1074 | unregister_key_type(&cifs_spnego_key_type); | 1087 | unregister_key_type(&cifs_spnego_key_type); |
1075 | #endif | 1088 | #endif |