linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-mm@kvack.org, Ira Weiny <ira.weiny@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-block@vger.kernel.org, ceph-devel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/5] bio: Use memzero_page() in bio_truncate()
Date: Thu, 12 Jun 2025 15:34:37 +0100	[thread overview]
Message-ID: <20250612143443.2848197-2-willy@infradead.org> (raw)
In-Reply-To: <20250612143443.2848197-1-willy@infradead.org>

memzero_page() is the new name for zero_user().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 block/bio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index 3c0a558c90f5..ce16c34ec6de 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -653,13 +653,13 @@ static void bio_truncate(struct bio *bio, unsigned new_size)
 
 	bio_for_each_segment(bv, bio, iter) {
 		if (done + bv.bv_len > new_size) {
-			unsigned offset;
+			size_t offset;
 
 			if (!truncated)
 				offset = new_size - done;
 			else
 				offset = 0;
-			zero_user(bv.bv_page, bv.bv_offset + offset,
+			memzero_page(bv.bv_page, bv.bv_offset + offset,
 				  bv.bv_len - offset);
 			truncated = true;
 		}
-- 
2.47.2



  reply	other threads:[~2025-06-12 14:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 14:34 [PATCH 0/5] Remove zero_user() Matthew Wilcox (Oracle)
2025-06-12 14:34 ` Matthew Wilcox (Oracle) [this message]
2025-06-25 10:40   ` [PATCH 1/5] bio: Use memzero_page() in bio_truncate() Alex Markuze
2025-06-12 14:34 ` [PATCH 2/5] null_blk: Use memzero_page() Matthew Wilcox (Oracle)
2025-06-25 10:41   ` Alex Markuze
2025-06-12 14:34 ` [PATCH 3/5] direct-io: " Matthew Wilcox (Oracle)
2025-06-25 10:40   ` Alex Markuze
2025-06-12 14:34 ` [PATCH 4/5] ceph: Convert ceph_zero_partial_page() to use a folio Matthew Wilcox (Oracle)
2025-06-12 19:36   ` Viacheslav Dubeyko
2025-06-12 14:34 ` [PATCH 5/5] mm: Remove zero_user() Matthew Wilcox (Oracle)
2025-06-25 10:41   ` Alex Markuze
2025-06-13  5:24 ` [PATCH 0/5] " Christoph Hellwig
2025-06-13 19:51   ` Matthew Wilcox
2025-06-13 20:04     ` Andrew Morton

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=20250612143443.2848197-2-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=ira.weiny@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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