Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CBE373AFD15; Sat, 12 Sep 2026 09:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789204450; cv=none; b=euzKsm2iylWcoNPSWV4buKRTaEYmXkzWg1oeiqc9G0/imQlQSw1MKMdX53dlfrb/KcfE49l2pCyrqnqWPWt+PmB9h+IUtHmpDQKEhGoDuIqmFkHfeP3J7A6UsgZY9wRtanxJUsi/AyHInCt58NZeqolzjkDeQr6U7aCRSx3pi8E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789204450; c=relaxed/simple; bh=D+00GKP2/kXSG5KVPVQCN8OPOzrJ7Mcf+t8Fr9AC780=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HMs4CzwSp4u5rre61jsm67CGcYgCDL0I/pNqsO2EGxFNJvySW7S1M5IjzYvExpJkJM2hlUyvnu6A1N6M6q0TzZZ7tc11jvO21JOoZ3yJHEO4z2YZY6uutXViPG3cqvBP3jNLh8OfJe8uI3f+9IaWINLYV1iMpS2Kg7D7rX8yTl8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QQA+ecNB; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QQA+ecNB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 876301F000FF; Sat, 12 Sep 2026 09:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789204448; bh=hy2cDudLC1xDAsY1KrguaEDpZxtiG3D2HreY5eQJnIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QQA+ecNBZ6PqmJzCfpbu0NOhCeYmubzmAzAC7d7NsTphX09UQya/N2OLmUvmC0KeJ sUZY9u9nWm6C3hnPPLhVyjYb8sjskwIaydgetEWvFCwvUhq8RIRMGlzdvMygJgg8Xy adt9F4RVHY/tV3GiPLZVWc35wDgVbKbE082Jl0sQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Namjae Jeon , Joanne Koong , "Christian Brauner (Amutable)" , Sasha Levin Subject: [PATCH 7.2 1616/1815] ntfs: convert iomap ops to ->iomap_next() Date: Sat, 12 Sep 2026 08:56:06 +0200 Message-ID: <20260912065726.927592229@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065648.999753832@linuxfoundation.org> References: <20260912065648.999753832@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joanne Koong [ Upstream commit 7a7bf7551624f8e7e1877f1b6ca088499b5ad25e ] Convert ntfs iomap_ops to the new ->iomap_next() callback. Each callback is generated with the DEFINE_IOMAP_ITER_NEXT()/DEFINE_IOMAP_ITER_NEXT_END() macros, which wrap the iomap_iter_next() helper to finish the previous mapping if needed and produce the next one. No functional changes are intended. Acked-by: Namjae Jeon Signed-off-by: Joanne Koong Link: https://patch.msgid.link/20260729192737.3190206-10-joannelkoong@gmail.com Signed-off-by: Christian Brauner (Amutable) Stable-dep-of: d9e00c457d4a ("ntfs: serialize resident iomap reads with mrec_lock") Signed-off-by: Sasha Levin --- fs/ntfs/iomap.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/fs/ntfs/iomap.c b/fs/ntfs/iomap.c index 52eecf5cb256a..d0964ac840d9f 100644 --- a/fs/ntfs/iomap.c +++ b/fs/ntfs/iomap.c @@ -277,8 +277,10 @@ static int ntfs_read_iomap_begin(struct inode *inode, loff_t offset, loff_t leng srcmap, true); } +static DEFINE_IOMAP_ITER_NEXT(ntfs_read_iomap_next, ntfs_read_iomap_begin); + const struct iomap_ops ntfs_read_iomap_ops = { - .iomap_begin = ntfs_read_iomap_begin, + .iomap_next = ntfs_read_iomap_next, }; /* @@ -329,13 +331,17 @@ static int ntfs_zero_read_iomap_end(struct inode *inode, loff_t pos, loff_t leng return written; } +static DEFINE_IOMAP_ITER_NEXT_END(ntfs_zero_read_iomap_next, + ntfs_seek_iomap_begin, ntfs_zero_read_iomap_end); + static const struct iomap_ops ntfs_zero_read_iomap_ops = { - .iomap_begin = ntfs_seek_iomap_begin, - .iomap_end = ntfs_zero_read_iomap_end, + .iomap_next = ntfs_zero_read_iomap_next, }; +static DEFINE_IOMAP_ITER_NEXT(ntfs_seek_iomap_next, ntfs_seek_iomap_begin); + const struct iomap_ops ntfs_seek_iomap_ops = { - .iomap_begin = ntfs_seek_iomap_begin, + .iomap_next = ntfs_seek_iomap_next, }; int ntfs_dio_zero_range(struct inode *inode, loff_t offset, loff_t length) @@ -764,9 +770,11 @@ static int ntfs_write_iomap_end(struct inode *inode, loff_t pos, loff_t length, return written; } +static DEFINE_IOMAP_ITER_NEXT_END(ntfs_write_iomap_next, + ntfs_write_iomap_begin, ntfs_write_iomap_end); + const struct iomap_ops ntfs_write_iomap_ops = { - .iomap_begin = ntfs_write_iomap_begin, - .iomap_end = ntfs_write_iomap_end, + .iomap_next = ntfs_write_iomap_next, }; static int ntfs_page_mkwrite_iomap_begin(struct inode *inode, loff_t offset, @@ -777,9 +785,11 @@ static int ntfs_page_mkwrite_iomap_begin(struct inode *inode, loff_t offset, NTFS_IOMAP_FLAGS_MKWRITE); } +static DEFINE_IOMAP_ITER_NEXT_END(ntfs_page_mkwrite_iomap_next, + ntfs_page_mkwrite_iomap_begin, ntfs_write_iomap_end); + const struct iomap_ops ntfs_page_mkwrite_iomap_ops = { - .iomap_begin = ntfs_page_mkwrite_iomap_begin, - .iomap_end = ntfs_write_iomap_end, + .iomap_next = ntfs_page_mkwrite_iomap_next, }; static int ntfs_dio_iomap_begin(struct inode *inode, loff_t offset, @@ -790,9 +800,11 @@ static int ntfs_dio_iomap_begin(struct inode *inode, loff_t offset, NTFS_IOMAP_FLAGS_DIO); } +static DEFINE_IOMAP_ITER_NEXT_END(ntfs_dio_iomap_next, + ntfs_dio_iomap_begin, ntfs_write_iomap_end); + const struct iomap_ops ntfs_dio_iomap_ops = { - .iomap_begin = ntfs_dio_iomap_begin, - .iomap_end = ntfs_write_iomap_end, + .iomap_next = ntfs_dio_iomap_next, }; static ssize_t ntfs_writeback_range(struct iomap_writepage_ctx *wpc, -- 2.53.0