[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251024080431.324236-2-hch@lst.de>
Date: Fri, 24 Oct 2025 10:04:12 +0200
From: Christoph Hellwig <hch@....de>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>,
Dominique Martinet <asmadeus@...ewreck.org>,
Christian Schoenebeck <linux_oss@...debyte.com>,
Chris Mason <clm@...com>,
David Sterba <dsterba@...e.com>,
Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Josef Bacik <josef@...icpanda.com>,
Jan Kara <jack@...e.cz>,
linux-block@...r.kernel.org,
v9fs@...ts.linux.dev,
linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
jfs-discussion@...ts.sourceforge.net,
ocfs2-devel@...ts.linux.dev,
linux-xfs@...r.kernel.org,
linux-mm@...ck.org,
David Hildenbrand <david@...hat.com>,
Damien Le Moal <dlemoal@...nel.org>,
Johannes Thumshirn <johannes.thumshirn@....com>
Subject: [PATCH 01/10] mm: don't opencode filemap_fdatawrite_range in filemap_invalidate_inode
Use filemap_fdatawrite_range instead of opencoding the logic using
filemap_fdatawrite_wbc.
Signed-off-by: Christoph Hellwig <hch@....de>
Reviewed-by: David Hildenbrand <david@...hat.com>
Reviewed-by: Jan Kara <jack@...e.cz>
Reviewed-by: Damien Le Moal <dlemoal@...nel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>
---
mm/filemap.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index 13f0259d993c..99d6919af60d 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -4457,16 +4457,8 @@ int filemap_invalidate_inode(struct inode *inode, bool flush,
unmap_mapping_pages(mapping, first, nr, false);
/* Write back the data if we're asked to. */
- if (flush) {
- struct writeback_control wbc = {
- .sync_mode = WB_SYNC_ALL,
- .nr_to_write = LONG_MAX,
- .range_start = start,
- .range_end = end,
- };
-
- filemap_fdatawrite_wbc(mapping, &wbc);
- }
+ if (flush)
+ filemap_fdatawrite_range(mapping, start, end);
/* Wait for writeback to complete on all folios and discard. */
invalidate_inode_pages2_range(mapping, start / PAGE_SIZE, end / PAGE_SIZE);
--
2.47.3
Powered by blists - more mailing lists