X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdecho%2Fecho_client.c;h=41e6214005965e300701e8c9d56eaa8597ed097b;hb=a08b190a278e952e1c303eb49233b542189656e6;hp=512ad9b90e02a83bd71d3af1bc7c5edd31c253b8;hpb=47bd80c90b9875871ceacbba75d6ef7157e89e73;p=fs%2Flustre-release.git diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 512ad9b..41e6214 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -28,6 +28,9 @@ /* * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2011 Whamcloud, Inc. + * */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -2101,10 +2104,16 @@ int echo_client_init(void) int rc; lprocfs_echo_init_vars(&lvars); - rc = class_register_type(&echo_obd_ops, NULL, lvars.module_vars, - LUSTRE_ECHO_CLIENT_NAME, &echo_device_type); + + rc = lu_kmem_init(echo_caches); if (rc == 0) - lu_kmem_init(echo_caches); + rc = class_register_type(&echo_obd_ops, NULL, + lvars.module_vars, + LUSTRE_ECHO_CLIENT_NAME, + &echo_device_type); + if (rc) + lu_kmem_fini(echo_caches); + return rc; }