diff options
author | Hongchao Zhang <hongchao.zhang@intel.com> | 2014-04-27 13:06:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-27 10:21:38 -0700 |
commit | 0b291b9a98460e5e2bc7e3c3f04dec269e1b28fe (patch) | |
tree | f8453f248dd893242639f4a77629c2e10c0cfced /drivers | |
parent | c547b70a2477bc31ba384fa64e63907e6ee4cfc3 (diff) |
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: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/8747
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4386
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/import.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 537aa6204a51..a04a1cc87809 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -381,6 +381,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); |