diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-12-06 17:03:50 -0800 |
| commit | 0c92218f4e7d4b4a7245d32bea042fa6f9cc39d7 (patch) | |
| tree | 44d6ba1879278a5a1b58178e9b0f799427e52e0e /include/linux/closure.h | |
| parent | b2f557a21bc8fffdcd65794eda8a854e024999f3 (diff) | |
| parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) | |
Merge branch 'master' into mm-hotfixes-stable
Diffstat (limited to 'include/linux/closure.h')
| -rw-r--r-- | include/linux/closure.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/closure.h b/include/linux/closure.h index de7bb47d8a46..c554c6a08768 100644 --- a/include/linux/closure.h +++ b/include/linux/closure.h @@ -104,7 +104,7 @@ struct closure; struct closure_syncer; -typedef void (closure_fn) (struct closure *); +typedef void (closure_fn) (struct work_struct *); extern struct dentry *bcache_debug; struct closure_waitlist { @@ -254,7 +254,7 @@ static inline void closure_queue(struct closure *cl) INIT_WORK(&cl->work, cl->work.func); BUG_ON(!queue_work(wq, &cl->work)); } else - cl->fn(cl); + cl->fn(&cl->work); } /** @@ -309,6 +309,11 @@ static inline void closure_wake_up(struct closure_waitlist *list) __closure_wake_up(list); } +#define CLOSURE_CALLBACK(name) void name(struct work_struct *ws) +#define closure_type(name, type, member) \ + struct closure *cl = container_of(ws, struct closure, work); \ + type *name = container_of(cl, type, member) + /** * continue_at - jump to another function with barrier * |
