summaryrefslogtreecommitdiff
path: root/include/linux/closure.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-07-05 09:14:14 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-05 09:16:45 -0400
commit8b06995115a8ade5e0b154311b771279ff97317f (patch)
treeeecd3c3cf493e9441a6b1ed0c0061bce045b7a66 /include/linux/closure.h
parentd061c7ea11672438ad339766ef1a73702c0778ab (diff)
Update bcachefs sources to 2be6fc9b111c bcachefs: bch2_gc_btree() should not use btree_root_lock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/closure.h')
-rw-r--r--include/linux/closure.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/closure.h b/include/linux/closure.h
index 59b8c06b..2af44427 100644
--- a/include/linux/closure.h
+++ b/include/linux/closure.h
@@ -159,6 +159,7 @@ struct closure {
#ifdef CONFIG_DEBUG_CLOSURES
#define CLOSURE_MAGIC_DEAD 0xc054dead
#define CLOSURE_MAGIC_ALIVE 0xc054a11e
+#define CLOSURE_MAGIC_STACK 0xc05451cc
unsigned int magic;
struct list_head all;
@@ -323,12 +324,18 @@ static inline void closure_init_stack(struct closure *cl)
{
memset(cl, 0, sizeof(struct closure));
atomic_set(&cl->remaining, CLOSURE_REMAINING_INITIALIZER);
+#ifdef CONFIG_DEBUG_CLOSURES
+ cl->magic = CLOSURE_MAGIC_STACK;
+#endif
}
static inline void closure_init_stack_release(struct closure *cl)
{
memset(cl, 0, sizeof(struct closure));
atomic_set_release(&cl->remaining, CLOSURE_REMAINING_INITIALIZER);
+#ifdef CONFIG_DEBUG_CLOSURES
+ cl->magic = CLOSURE_MAGIC_STACK;
+#endif
}
/**