lkml.org 
[lkml]   [2018]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] bcache: remove redundant condition before debugfs_remove
LGTM

Reviewed-by: tang.junhui.linux@gmail.com
zhong jiang <zhongjiang@huawei.com> 于2018年9月8日周六 下午9:08写道:
>
> debugfs_remove has taken the IS_ERR_OR_NULL into account. Just
> remove the unnecessary condition.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/md/bcache/super.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index 2d26f9e..a3d2a94 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -1506,8 +1506,7 @@ static void cache_set_free(struct closure *cl)
> struct cache *ca;
> unsigned int i;
>
> - if (!IS_ERR_OR_NULL(c->debug))
> - debugfs_remove(c->debug);
> + debugfs_remove(c->debug);
>
> bch_open_buckets_free(c);
> bch_btree_cache_free(c);
> --
> 1.7.12.4
>

\
 
 \ /
  Last update: 2018-09-10 04:46    [W:0.038 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site