btrfs: use KMEM_CACHE() to create btrfs_trans_handle cache
[linux-2.6-block.git] / fs / btrfs / transaction.c
index 22ca59e299485208d3307eef1ad0c6222e47e200..31ac5a04cc029689d25c8f612af5eb57293505a3 100644 (file)
@@ -2671,9 +2671,8 @@ void __cold __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
 
 int __init btrfs_transaction_init(void)
 {
-       btrfs_trans_handle_cachep = kmem_cache_create("btrfs_trans_handle",
-                       sizeof(struct btrfs_trans_handle), 0,
-                       SLAB_TEMPORARY | SLAB_MEM_SPREAD, NULL);
+       btrfs_trans_handle_cachep = KMEM_CACHE(btrfs_trans_handle,
+                                              SLAB_TEMPORARY | SLAB_MEM_SPREAD);
        if (!btrfs_trans_handle_cachep)
                return -ENOMEM;
        return 0;