Whamcloud - gitweb
LU-3201 lmv: check result of lmv_find_target()
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 22 Apr 2013 18:42:23 +0000 (13:42 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 25 Apr 2013 16:04:50 +0000 (12:04 -0400)
commitb0aa1d588ca1e07ccdf2539033a99f5145cffc11
tree1bdf0c9e93246ca294aecf2e994fc3c007da4fa5
parentf81e1d87e2b8e3360c42d5c6477926367b906fe2
LU-3201 lmv: check result of lmv_find_target()

In lmv_locate_mds() and lmv_iocontrol() check the result of
lmv_find_target() using IS_ERR() before dereferencing it.  In
lmv_get_target() return ERR_PTR(-ENODEV) rather than NULL when the
indicated MDS cannot be found among the members of lmv->tgts.  In
__lmv_fid_alloc() check the result of lmv_get_target() using IS_ERR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8cfce869e4be329fd432a7b6a88f48fbc81d69dd
Reviewed-on: http://review.whamcloud.com/6116
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c