Commit 0b291b9a authored by Hongchao Zhang's avatar Hongchao Zhang Committed by Greg Kroah-Hartman

staging/lustre/osc: don't activate deactivated obd_import

In ptlrpc_activate_import(), obd_import->imp_deactive should
be checked if it is deactivated, otherwise it will trigger an
LBUG in ptlrpc_invalidate_import():

  ptlrpc_invalidate_import() ASSERTION(imp->imp_invalid) failed
Signed-off-by: default avatarHongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/8747
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4386Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarFan Yong <fan.yong@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c547b70a
...@@ -381,6 +381,11 @@ void ptlrpc_activate_import(struct obd_import *imp) ...@@ -381,6 +381,11 @@ void ptlrpc_activate_import(struct obd_import *imp)
struct obd_device *obd = imp->imp_obd; struct obd_device *obd = imp->imp_obd;
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
if (imp->imp_deactive != 0) {
spin_unlock(&imp->imp_lock);
return;
}
imp->imp_invalid = 0; imp->imp_invalid = 0;
spin_unlock(&imp->imp_lock); spin_unlock(&imp->imp_lock);
obd_import_event(obd, imp, IMP_EVENT_ACTIVE); obd_import_event(obd, imp, IMP_EVENT_ACTIVE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment