From nobody Sat Apr 4 01:37:22 2026 Received: from smtpbgsg2.qq.com (smtpbgsg2.qq.com [54.254.200.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 343CB36B06F for ; Sat, 21 Mar 2026 10:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.128 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774090710; cv=none; b=o7qhbHXeSphd7upPF2RlexT9uaUy1LF2znAq/VMSH0C4ll6VC/siMJU7Bl8U8q9TAzK2ufmoAL5ziwnX6mpMqrtMpjDwYtXnQAb/eAsGTlpm3Yy3fvNJqQ+m04oyYtVhLpMRUd71EaJ60fjquGe08ynSqi3GBA51CnGEnq6oNzI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774090710; c=relaxed/simple; bh=xKVszSwr9y1UmTWAP7jTBCdIuZ/I41RJqcVjw7QLZSE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rmrem1LwHHLtitL9fkS2hb2NVvCHez0TmvIauFbsJt+JSWfODLsXoEXzvHNQaGEm04NOSgQAeJw1Q/oNe6ySLz3bE1RNh0tCFdPMxbso2MzYxfDo2ZVggzjmhB0DmrqjlG243BOvehDvxAqIKN67AIUSkSyBppX4dSIq1b6yBwg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=smail.nju.edu.cn; spf=pass smtp.mailfrom=smail.nju.edu.cn; dkim=pass (1024-bit key) header.d=smail.nju.edu.cn header.i=@smail.nju.edu.cn header.b=ay1U9Hwo; arc=none smtp.client-ip=54.254.200.128 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=smail.nju.edu.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=smail.nju.edu.cn Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=smail.nju.edu.cn header.i=@smail.nju.edu.cn header.b="ay1U9Hwo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smail.nju.edu.cn; s=iohv2404; t=1774090706; bh=Lfu5egxXROuCMtf548KGAdRsxhaYPc4cJKPPHCWoA9g=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ay1U9Hwo9ecTXsirvLy5ClfpH+t+eJB8SMlPVOzT4XkPgNb3goHh3sNIQUMjMfj2A kXHKhruc3l9KinpKY4yjq9PoQvXdVSqQRwNPpMJ4ENxQP4cnVUB6pG4Itr7btTrUXN NaoXaTRUg2b8mYo99nydZcYefgYdirOvqkMk7d0I= X-QQ-mid: esmtpsz10t1774090703t218a5446 X-QQ-Originating-IP: thTW8mE8sLjX1v/ZDwz2FKfAN66ysGzmapCIkwcNwpw= Received: from localhost.localdomain ( [116.172.93.199]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 21 Mar 2026 18:58:21 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 16276077046948655924 EX-QQ-RecipientCnt: 12 From: Kexin Sun To: kees@kernel.org, tony.luck@intel.com, gpiccoli@igalia.com, akpm@linux-foundation.org, urezki@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: julia.lawall@inria.fr, xutong.ma@inria.fr, kexinsun@smail.nju.edu.cn, yunbolyu@smu.edu.sg, ratnadiraw@smu.edu.sg Subject: [PATCH] mm: vmalloc: update outdated comment for renamed vread() Date: Sat, 21 Mar 2026 18:58:20 +0800 Message-Id: <20260321105820.7134-1-kexinsun@smail.nju.edu.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: esmtps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mRr4K6j+Ww+gnjKGrKOihTX9qt jKFQiRNIU6CvTmS8MeDA+DYzhNXHTatHB0h1XYd7VDyBUoTw8S7RV8t90ZcHI= X-QQ-XMRINFO: M/715EihBoGS47X28/vv4NpnfpeBLnr4Qg== X-QQ-RECHKSPAM: 0 Content-Type: text/plain; charset="utf-8" The function vread() was renamed to vread_iter() in commit 4c91c07c93bb ("mm: vmalloc: convert vread() to vread_iter()"), converting from a buffer-based to an iterator-based interface. Update the kdoc of vread_iter() to reflect the new interface: replace references to @buf with @iter, drop the stale "kernel's buffer" requirement, and update the self-reference from vread() to vread_iter(). Also update the stale vread() reference in pstore's ram_core.c. Assisted-by: unnamed:deepseek-v3.2 coccinelle Signed-off-by: Kexin Sun --- fs/pstore/ram_core.c | 2 +- mm/vmalloc.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index ed97494abf60..738283a85ea2 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -450,7 +450,7 @@ static void *persistent_ram_vmap(phys_addr_t start, siz= e_t size, pages[i] =3D pfn_to_page(addr >> PAGE_SHIFT); } /* - * VM_IOREMAP used here to bypass this region during vread() + * VM_IOREMAP used here to bypass this region during vread_iter() * and kmap_atomic() (i.e. kcore) to avoid __va() failures. */ vaddr =3D vmap(pages, page_count, VM_MAP | VM_IOREMAP, prot); diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 61caa55a4402..9ee256884f78 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -4575,20 +4575,20 @@ static size_t vmap_ram_vread_iter(struct iov_iter *= iter, const char *addr, * @count: number of bytes to be read. * * This function checks that addr is a valid vmalloc'ed area, and - * copy data from that area to a given buffer. If the given memory range + * copy data from that area to a given iterator. If the given memory range * of [addr...addr+count) includes some valid address, data is copied to - * proper area of @buf. If there are memory holes, they'll be zero-filled. + * proper area of @iter. If there are memory holes, they'll be zero-filled. * IOREMAP area is treated as memory hole and no copy is done. * * If [addr...addr+count) doesn't includes any intersects with alive - * vm_struct area, returns 0. @buf should be kernel's buffer. + * vm_struct area, returns 0. * - * Note: In usual ops, vread() is never necessary because the caller + * Note: In usual ops, vread_iter() is never necessary because the caller * should know vmalloc() area is valid and can use memcpy(). * This is for routines which have to access vmalloc area without * any information, as /proc/kcore. * - * Return: number of bytes for which addr and buf should be increased + * Return: number of bytes for which addr and iter should be advanced * (same number as @count) or %0 if [addr...addr+count) doesn't * include any intersection with valid vmalloc area */ --=20 2.25.1