diff options
author | Steve French <sfrench@us.ibm.com> | 2010-09-22 15:15:36 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 15:04:32 -0400 |
commit | d3bf5221d3274b5015ad18a55060b074cca8d2f0 (patch) | |
tree | 5ac76fa5f694a83d800898b8bb0ab505f66a1597 /fs/cifs/cifsfs.c | |
parent | 17edec6f563ba6b5630329fbe9473557bb475c3d (diff) |
[CIFS] Fix ordering of cleanup on module init failure
If registering fs cache failed, we weren't cleaning up proc.
Acked-by: Jeff Layton <jlayton@redhat.com>
CC: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 52e89ea07458..eeb8c67a3f29 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -933,11 +933,11 @@ init_cifs(void) | |||
933 | 933 | ||
934 | rc = cifs_fscache_register(); | 934 | rc = cifs_fscache_register(); |
935 | if (rc) | 935 | if (rc) |
936 | goto out; | 936 | goto out_clean_proc; |
937 | 937 | ||
938 | rc = cifs_init_inodecache(); | 938 | rc = cifs_init_inodecache(); |
939 | if (rc) | 939 | if (rc) |
940 | goto out_clean_proc; | 940 | goto out_unreg_fscache; |
941 | 941 | ||
942 | rc = cifs_init_mids(); | 942 | rc = cifs_init_mids(); |
943 | if (rc) | 943 | if (rc) |
@@ -959,19 +959,19 @@ init_cifs(void) | |||
959 | return 0; | 959 | return 0; |
960 | 960 | ||
961 | #ifdef CONFIG_CIFS_UPCALL | 961 | #ifdef CONFIG_CIFS_UPCALL |
962 | out_unregister_filesystem: | 962 | out_unregister_filesystem: |
963 | unregister_filesystem(&cifs_fs_type); | 963 | unregister_filesystem(&cifs_fs_type); |
964 | #endif | 964 | #endif |
965 | out_destroy_request_bufs: | 965 | out_destroy_request_bufs: |
966 | cifs_destroy_request_bufs(); | 966 | cifs_destroy_request_bufs(); |
967 | out_destroy_mids: | 967 | out_destroy_mids: |
968 | cifs_destroy_mids(); | 968 | cifs_destroy_mids(); |
969 | out_destroy_inodecache: | 969 | out_destroy_inodecache: |
970 | cifs_destroy_inodecache(); | 970 | cifs_destroy_inodecache(); |
971 | out_clean_proc: | 971 | out_unreg_fscache: |
972 | cifs_proc_clean(); | ||
973 | cifs_fscache_unregister(); | 972 | cifs_fscache_unregister(); |
974 | out: | 973 | out_clean_proc: |
974 | cifs_proc_clean(); | ||
975 | return rc; | 975 | return rc; |
976 | } | 976 | } |
977 | 977 | ||