From: Christoph Hellwig <hch@lst.de>
To: Andrew Morton <akpm@linux-foundation.org>,
Ryusuke Konishi <konishi.ryusuke@gmail.com>,
Hugh Dickins <hughd@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosry.ahmed@linux.dev>,
Nhat Pham <nphamcs@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
Chengming Zhou <chengming.zhou@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-nilfs@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 6/7] nilfs2: remove wbc->for_reclaim handling
Date: Thu, 8 May 2025 07:47:48 +0200 [thread overview]
Message-ID: <20250508054938.15894-7-hch@lst.de> (raw)
In-Reply-To: <20250508054938.15894-1-hch@lst.de>
Since commit 013a07052a1a ("nilfs2: convert metadata aops from writepage
to writepages"), nilfs_mdt_write_folio can't be called from reclaim
context any more. Remove the code keyed of the wbc->for_rename flag,
which is now only set for writing out swap or shmem pages inside the
swap code, but never passed to file systems.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/nilfs2/mdt.c | 2 --
fs/nilfs2/segment.c | 16 ----------------
fs/nilfs2/segment.h | 1 -
3 files changed, 19 deletions(-)
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
index 2f850a18d6e7..946b0d3534a5 100644
--- a/fs/nilfs2/mdt.c
+++ b/fs/nilfs2/mdt.c
@@ -422,8 +422,6 @@ static int nilfs_mdt_write_folio(struct folio *folio,
if (wbc->sync_mode == WB_SYNC_ALL)
err = nilfs_construct_segment(sb);
- else if (wbc->for_reclaim)
- nilfs_flush_segment(sb, inode->i_ino);
return err;
}
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 83970d97840b..61a4141f8d6b 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2221,22 +2221,6 @@ static void nilfs_segctor_do_flush(struct nilfs_sc_info *sci, int bn)
spin_unlock(&sci->sc_state_lock);
}
-/**
- * nilfs_flush_segment - trigger a segment construction for resource control
- * @sb: super block
- * @ino: inode number of the file to be flushed out.
- */
-void nilfs_flush_segment(struct super_block *sb, ino_t ino)
-{
- struct the_nilfs *nilfs = sb->s_fs_info;
- struct nilfs_sc_info *sci = nilfs->ns_writer;
-
- if (!sci || nilfs_doing_construction())
- return;
- nilfs_segctor_do_flush(sci, NILFS_MDT_INODE(sb, ino) ? ino : 0);
- /* assign bit 0 to data files */
-}
-
struct nilfs_segctor_wait_request {
wait_queue_entry_t wq;
__u32 seq;
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h
index f723f47ddc4e..4b39ed43ae72 100644
--- a/fs/nilfs2/segment.h
+++ b/fs/nilfs2/segment.h
@@ -226,7 +226,6 @@ extern void nilfs_relax_pressure_in_lock(struct super_block *);
extern int nilfs_construct_segment(struct super_block *);
extern int nilfs_construct_dsync_segment(struct super_block *, struct inode *,
loff_t, loff_t);
-extern void nilfs_flush_segment(struct super_block *, ino_t);
extern int nilfs_clean_segments(struct super_block *, struct nilfs_argv *,
void **);
--
2.47.2
next prev parent reply other threads:[~2025-05-08 5:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 5:47 stop passing a writeback_control to swap/shmem writeout Christoph Hellwig
2025-05-08 5:47 ` [PATCH 1/7] mm: split out a writeout helper from pageout Christoph Hellwig
2025-05-08 5:47 ` [PATCH 2/7] mm: stop passing a writeback_control structure to shmem_writeout Christoph Hellwig
2025-05-08 13:03 ` kernel test robot
2025-05-08 13:25 ` Matthew Wilcox
2025-05-08 14:03 ` Christoph Hellwig
2025-05-08 5:47 ` [PATCH 3/7] mm: tidy up swap_writeout Christoph Hellwig
2025-05-08 5:47 ` [PATCH 4/7] mm: stop passing a writeback_control structure to __swap_writepage Christoph Hellwig
2025-05-08 5:47 ` [PATCH 5/7] mm: stop passing a writeback_control structure to swap_writeout Christoph Hellwig
2025-05-08 11:38 ` kernel test robot
2025-05-08 5:47 ` Christoph Hellwig [this message]
2025-05-08 16:16 ` [PATCH 6/7] nilfs2: remove wbc->for_reclaim handling Ryusuke Konishi
2025-05-16 4:55 ` Christoph Hellwig
2025-05-16 6:08 ` Ryusuke Konishi
2025-05-08 5:47 ` [PATCH 7/7] mm: remove the for_reclaim field from struct writeback_control Christoph Hellwig
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=20250508054938.15894-7-hch@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=chengming.zhou@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=konishi.ryusuke@gmail.com \
--cc=linux-mm@kvack.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=willy@infradead.org \
--cc=yosry.ahmed@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).