mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zram: free secondary algorithms names
Date: Mon, 16 Sep 2024 07:44:23 -0700	[thread overview]
Message-ID: <20240916074423.36ec570115c556ff0ab78425@linux-foundation.org> (raw)
In-Reply-To: <20240911025600.3681789-1-senozhatsky@chromium.org>

On Wed, 11 Sep 2024 11:54:56 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:

> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -2115,6 +2115,13 @@ static void zram_destroy_comps(struct zram *zram)
>  		zram->num_active_comps--;
>  	}
>  
> +	for (prio = ZRAM_SECONDARY_COMP; prio < ZRAM_MAX_COMPS; prio++) {
> +		if (!zram->comp_algs[prio])
> +			continue;

We'll probably get emails telling us that this test-for-null is unneeded...

> +		kfree(zram->comp_algs[prio]);
> +		zram->comp_algs[prio] = NULL;
> +	}
> +
>  	zram_comp_params_reset(zram);
>  }

  reply	other threads:[~2024-09-16 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11  2:54 Sergey Senozhatsky
2024-09-16 14:44 ` Andrew Morton [this message]
2024-09-17  1:29   ` Sergey Senozhatsky
2024-09-17  1:30 ` [PATCHv2] " Sergey Senozhatsky
     [not found]   ` <CAF8kJuPq+JwvwrG+H+XU23Xz+Do+qy8RPJBBVRsL0YGQzZpfrQ@mail.gmail.com>
2024-09-24 15:52     ` Chris Li
2024-09-24 18:05       ` Chris Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240916074423.36ec570115c556ff0ab78425@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®