mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-11 07:30:16 +00:00
[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>
This commit is contained in:
parent
17edec6f56
commit
d3bf5221d3
@ -933,11 +933,11 @@ init_cifs(void)
|
|||||||
|
|
||||||
rc = cifs_fscache_register();
|
rc = cifs_fscache_register();
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out;
|
goto out_clean_proc;
|
||||||
|
|
||||||
rc = cifs_init_inodecache();
|
rc = cifs_init_inodecache();
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_clean_proc;
|
goto out_unreg_fscache;
|
||||||
|
|
||||||
rc = cifs_init_mids();
|
rc = cifs_init_mids();
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -959,19 +959,19 @@ init_cifs(void)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef CONFIG_CIFS_UPCALL
|
#ifdef CONFIG_CIFS_UPCALL
|
||||||
out_unregister_filesystem:
|
out_unregister_filesystem:
|
||||||
unregister_filesystem(&cifs_fs_type);
|
unregister_filesystem(&cifs_fs_type);
|
||||||
#endif
|
#endif
|
||||||
out_destroy_request_bufs:
|
out_destroy_request_bufs:
|
||||||
cifs_destroy_request_bufs();
|
cifs_destroy_request_bufs();
|
||||||
out_destroy_mids:
|
out_destroy_mids:
|
||||||
cifs_destroy_mids();
|
cifs_destroy_mids();
|
||||||
out_destroy_inodecache:
|
out_destroy_inodecache:
|
||||||
cifs_destroy_inodecache();
|
cifs_destroy_inodecache();
|
||||||
out_clean_proc:
|
out_unreg_fscache:
|
||||||
cifs_proc_clean();
|
|
||||||
cifs_fscache_unregister();
|
cifs_fscache_unregister();
|
||||||
out:
|
out_clean_proc:
|
||||||
|
cifs_proc_clean();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
#include "ntlmssp.h"
|
#include "ntlmssp.h"
|
||||||
#include "nterr.h"
|
#include "nterr.h"
|
||||||
#include "rfc1002pdu.h"
|
#include "rfc1002pdu.h"
|
||||||
#include "cn_cifs.h"
|
|
||||||
#include "fscache.h"
|
#include "fscache.h"
|
||||||
|
|
||||||
#define CIFS_PORT 445
|
#define CIFS_PORT 445
|
||||||
|
Loading…
x
Reference in New Issue
Block a user