Use kvfree() instead of open-coding it. Cc: Alasdair Kergon <a...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Pekka Enberg <penb...@kernel.org> --- 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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/