dm stats: Use kvfree() in dm_kvfree()
authorPekka Enberg <penberg@kernel.org>
Fri, 15 May 2015 18:35:21 +0000 (21:35 +0300)
committerMike Snitzer <snitzer@redhat.com>
Thu, 11 Jun 2015 21:13:02 +0000 (17:13 -0400)
Use kvfree() instead of open-coding it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-stats.c

index f478a4c96d2f55cb2cf75abe50bfc2ce365c2a8e..492fe6a5ebf2ad5c7178157a1c48a73f390a071d 100644 (file)
@@ -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)