summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/util.h
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2015-07-01 00:59:30 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-01 05:45:00 +0300
commit958b43384e41c129117284f48ba3fb9c11ebac75 (patch)
treecc5fe88ba48cca5d102368ae53f2a0b13f8cf26d /drivers/md/bcache/util.h
parent32a78facdd0a5e77d18d03dbe53e0823d249b0bb (diff)
downloadlinux-958b43384e41c129117284f48ba3fb9c11ebac75.tar.xz
bcache: use kvfree() in various places
Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg <penberg@kernel.org> Cc: Kent Overstreet <kmo@daterainc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/bcache/util.h')
-rw-r--r--drivers/md/bcache/util.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index 98df7572b5f7..1d04c4859c70 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -52,10 +52,7 @@ struct closure;
#define free_heap(heap) \
do { \
- if (is_vmalloc_addr((heap)->data)) \
- vfree((heap)->data); \
- else \
- kfree((heap)->data); \
+ kvfree((heap)->data); \
(heap)->data = NULL; \
} while (0)
@@ -163,10 +160,7 @@ do { \
#define free_fifo(fifo) \
do { \
- if (is_vmalloc_addr((fifo)->data)) \
- vfree((fifo)->data); \
- else \
- kfree((fifo)->data); \
+ kvfree((fifo)->data); \
(fifo)->data = NULL; \
} while (0)