Commit 3c150f00 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/lov: Move target sysfs symlink removal to LOV freeing

This helps to avoid use after free on unmount.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a82de7ea
......@@ -107,6 +107,10 @@ static void lov_putref(struct obd_device *obd)
/* Disconnect */
__lov_del_obd(obd, tgt);
}
if (lov->lov_tgts_kobj)
kobject_put(lov->lov_tgts_kobj);
} else {
mutex_unlock(&lov->lov_lock);
}
......@@ -322,9 +326,6 @@ static int lov_disconnect(struct obd_export *exp)
}
}
if (lov->lov_tgts_kobj)
kobject_put(lov->lov_tgts_kobj);
obd_putref(obd);
out:
......
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