aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2010-09-22 15:15:36 -0400
committerSteve French <sfrench@us.ibm.com>2010-09-29 15:04:32 -0400
commitd3bf5221d3274b5015ad18a55060b074cca8d2f0 (patch)
tree5ac76fa5f694a83d800898b8bb0ab505f66a1597 /fs/cifs
parent17edec6f563ba6b5630329fbe9473557bb475c3d (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')
-rw-r--r--fs/cifs/cifsfs.c18
-rw-r--r--fs/cifs/connect.c1
2 files changed, 9 insertions, 10 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: 962out_unregister_filesystem:
963 unregister_filesystem(&cifs_fs_type); 963 unregister_filesystem(&cifs_fs_type);
964#endif 964#endif
965 out_destroy_request_bufs: 965out_destroy_request_bufs:
966 cifs_destroy_request_bufs(); 966 cifs_destroy_request_bufs();
967 out_destroy_mids: 967out_destroy_mids:
968 cifs_destroy_mids(); 968 cifs_destroy_mids();
969 out_destroy_inodecache: 969out_destroy_inodecache:
970 cifs_destroy_inodecache(); 970 cifs_destroy_inodecache();
971 out_clean_proc: 971out_unreg_fscache:
972 cifs_proc_clean();
973 cifs_fscache_unregister(); 972 cifs_fscache_unregister();
974 out: 973out_clean_proc:
974 cifs_proc_clean();
975 return rc; 975 return rc;
976} 976}
977 977
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 271038b6ec0e..230410e0a453 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -47,7 +47,6 @@
47#include "ntlmssp.h" 47#include "ntlmssp.h"
48#include "nterr.h" 48#include "nterr.h"
49#include "rfc1002pdu.h" 49#include "rfc1002pdu.h"
50#include "cn_cifs.h"
51#include "fscache.h" 50#include "fscache.h"
52 51
53#define CIFS_PORT 445 52#define CIFS_PORT 445