Commit 2323d6d8 authored by Yang Sheng's avatar Yang Sheng Committed by Greg Kroah-Hartman

staging/lustre/llite: ensure obd is effective in onu_upcall

The watched obd device may still not setup while onu_upcall
invoked. So we need verify it in cl_ocd_update.
Signed-off-by: default avatarYang Sheng <>
Intel-bug-id: default avatarNiu Yawei <>
Reviewed-by: default avatarLai Siyao <>
Signed-off-by: default avatarOleg Drokin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent e8beaf67
......@@ -96,7 +96,8 @@ int cl_ocd_update(struct obd_device *host,
__u64 flags;
int result;
if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) {
if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME) &&
watched->obd_set_up && !watched->obd_stopping) {
cli = &watched->u.cli;
lco = owner;
flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
......@@ -111,9 +112,10 @@ int cl_ocd_update(struct obd_device *host,
result = 0;
} else {
CERROR("unexpected notification from %s %s!\n",
CERROR("unexpected notification from %s %s (setup:%d,stopping:%d)!\n",
watched->obd_name, watched->obd_set_up,
result = -EINVAL;
return result;
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