summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/closure.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-09-11 02:16:31 (GMT)
committerKent Overstreet <kmo@daterainc.com>2014-01-08 21:05:08 (GMT)
commita5ae4300c15c778722c139953c825cd24d6ff517 (patch)
treee9a633c4a4c5dde8e44b1226a0fbecf0f7c41b3c /drivers/md/bcache/closure.h
parentd56d000a1f424aa77538bd5aad18b43037ed20cc (diff)
downloadlinux-a5ae4300c15c778722c139953c825cd24d6ff517.tar.xz
bcache: Zero less memory
Another minor performance optimization Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/closure.h')
-rw-r--r--drivers/md/bcache/closure.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h
index 9762f1b..d29b773 100644
--- a/drivers/md/bcache/closure.h
+++ b/drivers/md/bcache/closure.h
@@ -348,24 +348,13 @@ do { \
} while (0)
/**
- * __closure_init() - Initialize a closure, skipping the memset()
- *
- * May be used instead of closure_init() when memory has already been zeroed.
- */
-#define __closure_init(cl, parent) \
- closure_init_type(cl, parent, true)
-
-/**
* closure_init() - Initialize a closure, setting the refcount to 1
* @cl: closure to initialize
* @parent: parent of the new closure. cl will take a refcount on it for its
* lifetime; may be NULL.
*/
#define closure_init(cl, parent) \
-do { \
- memset((cl), 0, sizeof(*(cl))); \
- __closure_init(cl, parent); \
-} while (0)
+ closure_init_type(cl, parent, true)
static inline void closure_init_stack(struct closure *cl)
{