[PATCH 12/14] dm: Use kvfree() in dm_kvfree()

From: Pekka Enberg
Date: Fri May 15 2015 - 14:37:38 EST


Use kvfree() instead of open-coding it.

Cc: Alasdair Kergon <agk@xxxxxxxxxx>
Cc: Mike Snitzer <snitzer@xxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
drivers/md/dm-stats.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/md/dm-stats.c b/drivers/md/dm-stats.c
index f478a4c..492fe6a 100644
--- a/drivers/md/dm-stats.c
+++ b/drivers/md/dm-stats.c
@@ -160,10 +160,7 @@ static void dm_kvfree(void *ptr, size_t alloc_size)

free_shared_memory(alloc_size);

- if (is_vmalloc_addr(ptr))
- vfree(ptr);
- else
- kfree(ptr);
+ kvfree(ptr);
}

static void dm_stat_free(struct rcu_head *head)
--
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/