Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404119

Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info
Date 2016-05-20 06:10 +0200
Message-ID <rAJV8-Hy-9@gated-at.bofh.it> (permalink)
References <ruy6m-7Dk-7@gated-at.bofh.it> <rAy3D-1w7-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On (05/19/16 11:18), Dan Streetman wrote:
[..]
>  	zs_stat_root = debugfs_create_dir("zsmalloc", NULL);
>  	if (!zs_stat_root)
> -		return -ENOMEM;
> -
> -	return 0;
> +		pr_warn("debugfs 'zsmalloc' stat dir creation failed\n");
>  }
>  
>  static void __exit zs_stat_exit(void)
> @@ -573,17 +575,19 @@ static const struct file_operations zs_stat_size_ops = {
>  	.release        = single_release,
>  };
>  
> -static int zs_pool_stat_create(struct zs_pool *pool, const char *name)
> +static void zs_pool_stat_create(struct zs_pool *pool, const char *name)
>  {
>  	struct dentry *entry;
>  
> -	if (!zs_stat_root)
> -		return -ENODEV;
> +	if (!zs_stat_root) {
> +		pr_warn("no root stat dir, not creating <%s> stat dir\n", name);
> +		return;
> +	}

just a small nit, there are basically two warn messages now for
`!zs_stat_root':

	debugfs 'zsmalloc' stat dir creation failed
	no root stat dir, not creating <%s> stat dir

may be we need only one of them; but no strong opinions.

	-ss

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info Dan Streetman <ddstreet@ieee.org> - 2016-05-19 17:30 +0200
  Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info Ganesh Mahendran <opensource.ganesh@gmail.com> - 2016-05-20 04:40 +0200
  Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-20 06:10 +0200
    Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info Dan Streetman <ddstreet@ieee.org> - 2016-05-20 12:40 +0200
  Re: [PATCHv2] mm/zsmalloc: don't fail if can't create debugfs info Minchan Kim <minchan@kernel.org> - 2016-05-23 05:10 +0200

csiph-web