]> www.infradead.org Git - users/hch/misc.git/commitdiff
nilfs2: remove wbc->for_reclaim handling
authorChristoph Hellwig <hch@lst.de>
Thu, 8 May 2025 05:37:53 +0000 (07:37 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 14 May 2025 04:51:24 +0000 (06:51 +0200)
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
fs/nilfs2/segment.c
fs/nilfs2/segment.h

index 2f850a18d6e7f830be3af754dc21faa4f9852539..946b0d3534a5f22f34ac44a91fb121541881c548 100644 (file)
@@ -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;
 }
index 83970d97840b4f51c4e6a46dcc55774981df7c83..61a4141f8d6b2dc7319d90759abbc43132eeab1b 100644 (file)
@@ -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;
index f723f47ddc4e7fc6db1c8c62d733e6f40bc52dc6..4b39ed43ae72f1f35d675a4a46b1b696621078d5 100644 (file)
@@ -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 **);