aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.c
diff options
context:
space:
mode:
authorKunwu Chan <[email protected]>2024-02-20 09:06:41 +0000
committerDavid Sterba <[email protected]>2024-03-04 15:24:53 +0000
commit4bd3e126b2793313a5b85af5aefe51fefb1e205e (patch)
tree57902838e4d2589e7b92308e53455e9d6aa57df8 /fs/btrfs/ordered-data.c
parentbtrfs: use KMEM_CACHE() to create btrfs_delayed_node cache (diff)
downloadkernel-4bd3e126b2793313a5b85af5aefe51fefb1e205e.tar.gz
kernel-4bd3e126b2793313a5b85af5aefe51fefb1e205e.zip
btrfs: use KMEM_CACHE() to create btrfs_ordered_extent 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 <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/ordered-data.c')
-rw-r--r--fs/btrfs/ordered-data.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index de12c282e69b..1ee2fb8dcd6a 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -1235,10 +1235,7 @@ struct btrfs_ordered_extent *btrfs_split_ordered_extent(
int __init ordered_data_init(void)
{
- btrfs_ordered_extent_cache = kmem_cache_create("btrfs_ordered_extent",
- sizeof(struct btrfs_ordered_extent), 0,
- SLAB_MEM_SPREAD,
- NULL);
+ btrfs_ordered_extent_cache = KMEM_CACHE(btrfs_ordered_extent, SLAB_MEM_SPREAD);
if (!btrfs_ordered_extent_cache)
return -ENOMEM;