try_to_grab_pending() was re-calculating the associated pwq using get_work_pwq() when it already has it cached in a local varible and the association can't change. Reuse the local variable instead. This doesn't introduce any functional changes. tj: Updated description.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -1225,7 +1225,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork, · 1224 unmodified lines | ||
| 1225 | 1225 | pwq_activate_delayed_work(work); |
| 1226 | 1226 | |
| 1227 | 1227 | list_del_init(&work->entry); |
| 1228 | − pwq_dec_nr_in_flight(get_work_pwq(work), get_work_color(work)); | |
| 1228 | + pwq_dec_nr_in_flight(pwq, get_work_color(work)); | |
| 1229 | 1229 | |
| 1230 | 1230 | /* work->data points to pwq iff queued, point to pool */ |
| 1231 | 1231 | set_work_pool_and_keep_pending(work, pool->id); |