Null reference at the start of obd_statfs() function is possible
because of ll_fill_super vs lctl race.
ll_md_exp is initialized in ll_fill_super()->
client_common_fill_super(), but if mount process stucks
in lustre_process_log() it doesn't reach client_common_fill_super().
Change-Id: Ife72a62ba42573e2a9c6d244e36cde738b70c15a
hpe-bug-id: LUS-9150
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@hpe.com>
Reviewed-on: https://es-gerrit.dev.cray.com/157732
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-on: https://review.whamcloud.com/39812
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
struct obd_statfs *osfs, time64_t max_age,
__u32 flags)
{
- struct obd_device *obd = exp->exp_obd;
+ struct obd_device *obd;
int rc = 0;
ENTRY;
- if (unlikely(obd == NULL))
+ if (unlikely(exp == NULL || exp->exp_obd == NULL))
RETURN(-EINVAL);
+ obd = exp->exp_obd;
OBD_CHECK_DEV_ACTIVE(obd);
if (unlikely(!obd->obd_type || !obd->obd_type->typ_dt_ops->o_statfs)) {