]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
gfs2: amend SLAB_RECLAIM_ACCOUNT on gfs2 related slab cache
authorZhaoyang Huang <zhaoyang.huang@unisoc.com>
Tue, 5 Jan 2021 12:48:00 +0000 (07:48 -0500)
committerBob Peterson <rpeterso@redhat.com>
Fri, 22 Jan 2021 17:19:17 +0000 (12:19 -0500)
As gfs2_quotad_cachep and gfs2_glock_cachep have registered
shrinkers, amending SLAB_RECLAIM_ACCOUNT when creating them,
which improves slab accounting.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/main.c

index c7393ee9cf68369f588a52f5bea3e62290b6921c..28d0eb23e18edaa70411ca5878a1ed0c296d5dfa 100644 (file)
@@ -98,7 +98,7 @@ static int __init init_gfs2_fs(void)
        error = -ENOMEM;
        gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
                                              sizeof(struct gfs2_glock),
-                                             0, 0,
+                                             0, SLAB_RECLAIM_ACCOUNT,
                                              gfs2_init_glock_once);
        if (!gfs2_glock_cachep)
                goto fail_cachep1;
@@ -134,7 +134,7 @@ static int __init init_gfs2_fs(void)
 
        gfs2_quotad_cachep = kmem_cache_create("gfs2_quotad",
                                               sizeof(struct gfs2_quota_data),
-                                              0, 0, NULL);
+                                              0, SLAB_RECLAIM_ACCOUNT, NULL);
        if (!gfs2_quotad_cachep)
                goto fail_cachep6;