summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-inode.c
diff options
context:
space:
mode:
authorKunwu Chan <chentao@kylinos.cn>2024-02-20 10:06:40 +0100
committerDavid Sterba <dsterba@suse.com>2024-03-04 16:24:53 +0100
commit625c1e0638c90352af83035022332dafbe115494 (patch)
treef467cdb06f359ca95a7cf8e7feb20b08deed6f25 /fs/btrfs/delayed-inode.c
parentbtrfs: uninline some static inline helpers from delayed-ref.h (diff)
downloadlinux-625c1e0638c90352af83035022332dafbe115494.tar.xz
linux-625c1e0638c90352af83035022332dafbe115494.zip
btrfs: use KMEM_CACHE() to create btrfs_delayed_node 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/delayed-inode.c')
-rw-r--r--fs/btrfs/delayed-inode.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 920225658fb1..0a7a40d97e91 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -28,11 +28,7 @@ static struct kmem_cache *delayed_node_cache;
int __init btrfs_delayed_inode_init(void)
{
- delayed_node_cache = kmem_cache_create("btrfs_delayed_node",
- sizeof(struct btrfs_delayed_node),
- 0,
- SLAB_MEM_SPREAD,
- NULL);
+ delayed_node_cache = KMEM_CACHE(btrfs_delayed_node, SLAB_MEM_SPREAD);
if (!delayed_node_cache)
return -ENOMEM;
return 0;