Whamcloud - gitweb
LU-3810 obd: Cleanup client import if client_obd_setup fails 61/7561/4
authorSwapnil Pimpale <spimpale@ddn.com>
Thu, 5 Sep 2013 12:27:00 +0000 (17:57 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Nov 2013 23:20:00 +0000 (23:20 +0000)
commit911b6167a37c2dba835baab4e100dcf206c03113
tree1706360fd8e56167c451f0f40be8d88212892fee
parentb4cb26db3e6163aabf8e804578a25eaad8e3a45c
LU-3810 obd: Cleanup client import if client_obd_setup fails

client_obd_setup() allocates an obd_import which should be cleaned up
if there is any failure afterwards in callers of client_obd_setup().
This patch fixes the bug in osc_setup(), mgc_setup(), mdc_setup() and
lwp_setup(). The fix is to call obd_cleanup_client_import() before
calling client_obd_cleanup() in case of an error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ib8c2194d80fd14538d4ca42fb8084c93dd575199
Reviewed-on: http://review.whamcloud.com/7561
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ldlm/ldlm_lib.c
lustre/mgc/libmgc.c
lustre/mgc/mgc_request.c
lustre/osp/lwp_dev.c
lustre/osp/osp_dev.c