diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 01:38:57 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-05-17 02:36:19 -0400 |
commit | ff86d4722124c300c40b85b6eb8ef2d410ab303c (patch) | |
tree | 05e54b0bf6397ecbb5e7717a7925ac6ed2645a68 /linux/workqueue.c | |
parent | 800408be11898f6d53ceecfd894cce8860fda26a (diff) |
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
Diffstat (limited to 'linux/workqueue.c')
-rw-r--r-- | linux/workqueue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/workqueue.c b/linux/workqueue.c index f5942772..4dfd6cd9 100644 --- a/linux/workqueue.c +++ b/linux/workqueue.c @@ -55,9 +55,10 @@ bool queue_work(struct workqueue_struct *wq, struct work_struct *work) return ret; } -void delayed_work_timer_fn(unsigned long __data) +void delayed_work_timer_fn(struct timer_list *timer) { - struct delayed_work *dwork = (struct delayed_work *) __data; + struct delayed_work *dwork = + container_of(timer, struct delayed_work, timer); pthread_mutex_lock(&wq_lock); __queue_work(dwork->wq, &dwork->work); @@ -71,8 +72,7 @@ static void __queue_delayed_work(struct workqueue_struct *wq, struct timer_list *timer = &dwork->timer; struct work_struct *work = &dwork->work; - BUG_ON(timer->function != delayed_work_timer_fn || - timer->data != (unsigned long)dwork); + BUG_ON(timer->function != delayed_work_timer_fn); BUG_ON(timer_pending(timer)); BUG_ON(!list_empty(&work->entry)); |