From c8a04503ebca2e596ff75f6f7162e0df7ea1891e Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Thu, 5 Sep 2013 21:50:48 +0800 Subject: [PATCH] LU-4386 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 Change-Id: I4c16f166c0c2cf60664119bf438dfd8606d71a2f Signed-off-by: Hongchao Zhang Reviewed-on: http://review.whamcloud.com/8747 Reviewed-by: Andreas Dilger Tested-by: Jenkins Reviewed-by: Fan Yong Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/ptlrpc/import.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 1076b96..3ba64d7 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -387,6 +387,11 @@ void ptlrpc_activate_import(struct obd_import *imp) struct obd_device *obd = imp->imp_obd; spin_lock(&imp->imp_lock); + if (imp->imp_deactive != 0) { + spin_unlock(&imp->imp_lock); + return; + } + imp->imp_invalid = 0; spin_unlock(&imp->imp_lock); obd_import_event(obd, imp, IMP_EVENT_ACTIVE); -- 1.8.3.1