diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-02-20 17:06:43 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-03-04 16:24:53 +0100 |
commit | 66ce5447d8686f99b510aa48fe69934a93b1dbe8 (patch) | |
tree | f336bd377e934b1fd564474dccf18145558082bf /fs/btrfs | |
parent | 2753b4d8282e2cad95ff82fcea07059e3d52ac54 (diff) |
btrfs: use KMEM_CACHE() to create btrfs_path cache
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify
the creation of SLAB caches when the default values are used.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ctree.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c878ca466b7c..bae17dbe71d6 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -5086,9 +5086,7 @@ int btrfs_previous_extent_item(struct btrfs_root *root, int __init btrfs_ctree_init(void) { - btrfs_path_cachep = kmem_cache_create("btrfs_path", - sizeof(struct btrfs_path), 0, - SLAB_MEM_SPREAD, NULL); + btrfs_path_cachep = KMEM_CACHE(btrfs_path, SLAB_MEM_SPREAD); if (!btrfs_path_cachep) return -ENOMEM; return 0; |