public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan@kernel.org>,
	Brian Geffon <bgeffon@google.com>,
	linux-block@vger.kernel.org, linux-mm@kvack.org,
	Qu Wenruo <wqu@suse.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] zram: do not forget to endio for partial discard requests
Date: Tue, 31 Mar 2026 09:26:33 +0200	[thread overview]
Message-ID: <20260331072633.GA5494@lst.de> (raw)
In-Reply-To: <20260331071537.706139-1-senozhatsky@chromium.org>

On Tue, Mar 31, 2026 at 04:15:06PM +0900, Sergey Senozhatsky wrote:
> +++ b/drivers/block/zram/zram_drv.c
> @@ -2683,8 +2683,10 @@ static void zram_bio_discard(struct zram *zram, struct bio *bio)
>  	 * skipping this logical block is appropriate here.
>  	 */
>  	if (offset) {
> -		if (n <= (PAGE_SIZE - offset))
> +		if (n <= (PAGE_SIZE - offset)) {
> +			bio_endio(bio);
>  			return;
> +		}

Use goto end_bio and share the code with the final completion at the
end of the function?


  reply	other threads:[~2026-03-31  7:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  7:15 [PATCH] zram: do not forget to endio for partial discard requests Sergey Senozhatsky
2026-03-31  7:26 ` Christoph Hellwig [this message]
2026-03-31  7:27   ` Sergey Senozhatsky
2026-03-31  7:32 ` Qu Wenruo
2026-03-31  7:37   ` Sergey Senozhatsky

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=20260331072633.GA5494@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=wqu@suse.com \
    /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