diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2007-05-09 05:34:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-09 15:30:54 -0400 |
commit | 5bd5f5812bfa753218e02cb773e06ede48055798 (patch) | |
tree | 266b416bca305ff32cf121490d31fd1b6bf32a75 /net/sunrpc/sunrpc_syms.c | |
parent | cd123012d99fde4759500fee611e724e4f3016e3 (diff) |
sunrpc: fix error path in module_init
register_rpc_pipefs() needs to clean up rpc_inode_cache
by kmem_cache_destroy() on register_filesystem() failure.
init_sunrpc() needs to unregister rpc_pipe_fs by unregister_rpc_pipefs()
when rpc_init_mempool() returns error.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/sunrpc/sunrpc_syms.c')
-rw-r--r-- | net/sunrpc/sunrpc_syms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 43ecf62f12ef..0d35bc796d00 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -146,9 +146,11 @@ init_sunrpc(void) | |||
146 | int err = register_rpc_pipefs(); | 146 | int err = register_rpc_pipefs(); |
147 | if (err) | 147 | if (err) |
148 | goto out; | 148 | goto out; |
149 | err = rpc_init_mempool() != 0; | 149 | err = rpc_init_mempool(); |
150 | if (err) | 150 | if (err) { |
151 | unregister_rpc_pipefs(); | ||
151 | goto out; | 152 | goto out; |
153 | } | ||
152 | #ifdef RPC_DEBUG | 154 | #ifdef RPC_DEBUG |
153 | rpc_register_sysctl(); | 155 | rpc_register_sysctl(); |
154 | #endif | 156 | #endif |