@@ -160,7 +160,7 @@ static const struct seq_operations monitor_reactors_seq_ops = {
160
160
161
161
static void monitor_swap_reactors_single (struct rv_monitor * mon ,
162
162
struct rv_reactor * reactor ,
163
- bool reacting , bool nested )
163
+ bool nested )
164
164
{
165
165
bool monitor_enabled ;
166
166
@@ -173,32 +173,30 @@ static void monitor_swap_reactors_single(struct rv_monitor *mon,
173
173
rv_disable_monitor (mon );
174
174
175
175
mon -> reactor = reactor ;
176
- mon -> reacting = reacting ;
177
176
mon -> react = reactor -> react ;
178
177
179
178
/* enable only once if iterating through a container */
180
179
if (monitor_enabled && !nested )
181
180
rv_enable_monitor (mon );
182
181
}
183
182
184
- static void monitor_swap_reactors (struct rv_monitor * mon ,
185
- struct rv_reactor * reactor , bool reacting )
183
+ static void monitor_swap_reactors (struct rv_monitor * mon , struct rv_reactor * reactor )
186
184
{
187
185
struct rv_monitor * p = mon ;
188
186
189
187
if (rv_is_container_monitor (mon ))
190
188
list_for_each_entry_continue (p , & rv_monitors_list , list ) {
191
189
if (p -> parent != mon )
192
190
break ;
193
- monitor_swap_reactors_single (p , reactor , reacting , true);
191
+ monitor_swap_reactors_single (p , reactor , true);
194
192
}
195
193
/*
196
194
* This call enables and disables the monitor if they were active.
197
195
* In case of a container, we already disabled all and will enable all.
198
196
* All nested monitors are enabled also if they were off, we may refine
199
197
* this logic in the future.
200
198
*/
201
- monitor_swap_reactors_single (mon , reactor , reacting , false);
199
+ monitor_swap_reactors_single (mon , reactor , false);
202
200
}
203
201
204
202
static ssize_t
@@ -210,7 +208,6 @@ monitor_reactors_write(struct file *file, const char __user *user_buf,
210
208
struct rv_reactor * reactor ;
211
209
struct seq_file * seq_f ;
212
210
int retval = - EINVAL ;
213
- bool enable ;
214
211
char * ptr ;
215
212
int len ;
216
213
@@ -243,12 +240,7 @@ monitor_reactors_write(struct file *file, const char __user *user_buf,
243
240
if (strcmp (ptr , reactor -> name ) != 0 )
244
241
continue ;
245
242
246
- if (strcmp (reactor -> name , "nop" ))
247
- enable = false;
248
- else
249
- enable = true;
250
-
251
- monitor_swap_reactors (mon , reactor , enable );
243
+ monitor_swap_reactors (mon , reactor );
252
244
253
245
retval = count ;
254
246
break ;
@@ -439,7 +431,6 @@ int reactor_populate_monitor(struct rv_monitor *mon)
439
431
* Configure as the rv_nop reactor.
440
432
*/
441
433
mon -> reactor = get_reactor_rdef_by_name ("nop" );
442
- mon -> reacting = false;
443
434
444
435
return 0 ;
445
436
}
0 commit comments