bcachefs: io clock: run timer fns under clock lock
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 30 Jun 2024 01:02:17 +0000 (21:02 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 2 Jul 2024 02:56:28 +0000 (22:56 -0400)
commita2d23f3d916bf9abd77944882cba131af1085bcc
tree0aa90255a9354617ddf44bb6ab828210ea283253
parentb5cbb42dc59f519fa3cf49b9afbd5ee4805be01b
bcachefs: io clock: run timer fns under clock lock

We don't have a way to flush a timer that's executing the callback, and
this is simple and limited enough in scope that we can just use the lock
instead.

Needed for the next patch that adds direct wakeups from the allocator to
copygc, where we're now more frequently calling io_timer_del() on an
expiring timer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/clock.c