aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/closure.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 11:50:17 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 11:50:17 -0700
commit9c5891bd4342349a200676d33f742dd1b864822c (patch)
treeb14c1698f2d8ce5276e1befd562f6398a46b48b9 /drivers/md/bcache/closure.c
parentpcmcia: synclink_cs: replace sum of bitmasks with OR operation. (diff)
parentLinux 3.11-rc3 (diff)
downloadlinux-dev-9c5891bd4342349a200676d33f742dd1b864822c.tar.xz
linux-dev-9c5891bd4342349a200676d33f742dd1b864822c.zip
Merge 3.11-rc3 into char-misc-next.
This resolves a merge issue with: drivers/misc/mei/init.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/bcache/closure.c')
-rw-r--r--drivers/md/bcache/closure.c6
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);