LU-2059 mgs: fix a bug in mgs_llog_open
- don't calculate len for NULL ptr
- check the logname is PARAMS_FILENAME inside 'if (ptr == NULL ...)
clause so all cases with NULL ptr will end there.
This patch is back-ported from the following one:
Lustre-commit:
8c21986e79f50131b0f381e5fe0311294328d660
Lustre-change: http://review.whamcloud.com/10589
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ic69866e91acad7920085848faf12c69bf3d17f12
Reviewed-on: http://review.whamcloud.com/12428
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>