- llog_cancel(llog_get_context(obd, cookie->lgc_subsys + 1),
- NULL, 1, cookie, 0);
- //NULL, 1, cookie, OBD_LLOG_FL_SENDNOW);
+ struct obd_llogs *llogs = NULL;
+ struct llog_ctxt *ctxt;
+
+ /* we have to find context for right group */
+ llogs = filter_grab_llog_for_group(obd, cookie->lgc_lgl.lgl_ogr, NULL);
+
+ if (llogs) {
+ ctxt = llog_get_context(llogs, cookie->lgc_subsys + 1);
+ if (ctxt) {
+ llog_cancel(ctxt, 1, cookie, 0, NULL);
+ } else
+ CERROR("no valid context for group "LPU64"\n",
+ cookie->lgc_lgl.lgl_ogr);
+ } else {
+ CDEBUG(D_HA, "unknown group "LPU64"!\n", cookie->lgc_lgl.lgl_ogr);
+ }
+