]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - linux/closure.c
Disable pristine-tar option in gbp.conf, since there is no pristine-tar branch.
[bcachefs-tools-debian] / linux / closure.c
index 1faa24d6400e6097c8a0640d34768e32a9cd68b8..c16540552d61bc14121b034a9d6e302045ff0dc5 100644 (file)
@@ -17,9 +17,8 @@ static inline void closure_put_after_sub(struct closure *cl, int flags)
 {
        int r = flags & CLOSURE_REMAINING_MASK;
 
-       if ((flags & CLOSURE_GUARD_MASK) ||
-           (!r && (flags & ~CLOSURE_DESTRUCTOR)))
-               panic("closure_put_after_sub: bogus flags %x remaining %i", flags, r);
+       BUG_ON(flags & CLOSURE_GUARD_MASK);
+       BUG_ON(!r && (flags & ~CLOSURE_DESTRUCTOR));
 
        if (!r) {
                smp_acquire__after_ctrl_dep();
@@ -37,7 +36,7 @@ static inline void closure_put_after_sub(struct closure *cl, int flags)
                        closure_debug_destroy(cl);
 
                        if (destructor)
-                               destructor(cl);
+                               destructor(&cl->work);
 
                        if (parent)
                                closure_put(parent);
@@ -109,8 +108,9 @@ struct closure_syncer {
        int                     done;
 };
 
-static void closure_sync_fn(struct closure *cl)
+static CLOSURE_CALLBACK(closure_sync_fn)
 {
+       struct closure *cl = container_of(ws, struct closure, work);
        struct closure_syncer *s = cl->s;
        struct task_struct *p;