diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-08-12 09:43:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-08-12 09:43:45 +0200 |
commit | cada23f308e3869ceb5c75f164d249448dfaec07 (patch) | |
tree | 97c7aebcad0eb2a93a7519251a01f5be9255ee75 /drivers/md/bcache/closure.c | |
parent | e769ece3b129698d2b09811a6f6d304e4eaa8c29 (diff) | |
parent | 6c8c0c4dc0e98ee2191211d66e9f876e95787073 (diff) |
Merge branch 'kvm-arm64/fixes-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into kvm-master
Diffstat (limited to 'drivers/md/bcache/closure.c')
-rw-r--r-- | drivers/md/bcache/closure.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c index bd05a9a8c7cf..9aba2017f0d1 100644 --- a/drivers/md/bcache/closure.c +++ b/drivers/md/bcache/closure.c @@ -66,16 +66,18 @@ static inline void closure_put_after_sub(struct closure *cl, int flags) } else { struct closure *parent = cl->parent; struct closure_waitlist *wait = closure_waitlist(cl); + closure_fn *destructor = cl->fn; closure_debug_destroy(cl); + smp_mb(); atomic_set(&cl->remaining, -1); if (wait) closure_wake_up(wait); - if (cl->fn) - cl->fn(cl); + if (destructor) + destructor(cl); if (parent) closure_put(parent); |