Whamcloud - gitweb
LU-7628 lfs: fix NULL pointer check in cb_migrate_mdt_init() 14/17814/3
authorEmoly Liu <emoly.liu@intel.com>
Tue, 5 Jan 2016 03:55:40 +0000 (11:55 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 25 Jan 2016 01:58:27 +0000 (01:58 +0000)
commit39fe7d2ef4da9bcfc2f9113c7c2ea45fcf93450e
tree8e87171253f63b92bd0d7857951e6a1dca9843e9
parentef994d803ffbd65f96d364ddff31122b076c7eb0
LU-7628 lfs: fix NULL pointer check in cb_migrate_mdt_init()

After calling opendir() at the end of cb_migrate_mdt_init(), we should
check *dirp rather then dirp, and we should close temporary parent
directory before return error.
Also, this patch improves the code a little to make it more readable.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I2507cbd6464ea56fba7793431905cdf51136413f
Reviewed-on: http://review.whamcloud.com/17814
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/liblustreapi.c