aboutsummaryrefslogtreecommitdiffstats
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index aba39a291523..72698db958e7 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -573,17 +573,17 @@ static const struct file_operations zs_stat_size_ops = {
573 .release = single_release, 573 .release = single_release,
574}; 574};
575 575
576static int zs_pool_stat_create(struct zs_pool *pool, const char *name) 576static void zs_pool_stat_create(struct zs_pool *pool, const char *name)
577{ 577{
578 struct dentry *entry; 578 struct dentry *entry;
579 579
580 if (!zs_stat_root) 580 if (!zs_stat_root)
581 return -ENODEV; 581 return;
582 582
583 entry = debugfs_create_dir(name, zs_stat_root); 583 entry = debugfs_create_dir(name, zs_stat_root);
584 if (!entry) { 584 if (!entry) {
585 pr_warn("debugfs dir <%s> creation failed\n", name); 585 pr_warn("debugfs dir <%s> creation failed\n", name);
586 return -ENOMEM; 586 return;
587 } 587 }
588 pool->stat_dentry = entry; 588 pool->stat_dentry = entry;
589 589
@@ -592,10 +592,8 @@ static int zs_pool_stat_create(struct zs_pool *pool, const char *name)
592 if (!entry) { 592 if (!entry) {
593 pr_warn("%s: debugfs file entry <%s> creation failed\n", 593 pr_warn("%s: debugfs file entry <%s> creation failed\n",
594 name, "classes"); 594 name, "classes");
595 return -ENOMEM; 595 return;
596 } 596 }
597
598 return 0;
599} 597}
600 598
601static void zs_pool_stat_destroy(struct zs_pool *pool) 599static void zs_pool_stat_destroy(struct zs_pool *pool)
@@ -613,9 +611,8 @@ static void __exit zs_stat_exit(void)
613{ 611{
614} 612}
615 613
616static inline int zs_pool_stat_create(struct zs_pool *pool, const char *name) 614static inline void zs_pool_stat_create(struct zs_pool *pool, const char *name)
617{ 615{
618 return 0;
619} 616}
620 617
621static inline void zs_pool_stat_destroy(struct zs_pool *pool) 618static inline void zs_pool_stat_destroy(struct zs_pool *pool)
@@ -623,7 +620,6 @@ static inline void zs_pool_stat_destroy(struct zs_pool *pool)
623} 620}
624#endif 621#endif
625 622
626
627/* 623/*
628 * For each size class, zspages are divided into different groups 624 * For each size class, zspages are divided into different groups
629 * depending on how "full" they are. This was done so that we could 625 * depending on how "full" they are. This was done so that we could
@@ -1952,8 +1948,8 @@ struct zs_pool *zs_create_pool(const char *name)
1952 prev_class = class; 1948 prev_class = class;
1953 } 1949 }
1954 1950
1955 if (zs_pool_stat_create(pool, name)) 1951 /* debug only, don't abort if it fails */
1956 goto err; 1952 zs_pool_stat_create(pool, name);
1957 1953
1958 /* 1954 /*
1959 * Not critical, we still can use the pool 1955 * Not critical, we still can use the pool