Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nilfs2: remove wbc->for_reclaim handling

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_reclaim flag,
which is now only set for writing out swap or shmem pages inside the swap
code, but never passed to file systems.

Link: https://lkml.kernel.org/r/20250508054938.15894-7-hch@lst.de
Link: https://lkml.kernel.org/r/20250516123417.6779-1-konishi.ryusuke@gmail.com
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Christoph Hellwig and committed by
Andrew Morton
84e43764 8e02b1b7

-19
-2
fs/nilfs2/mdt.c
··· 422 422 423 423 if (wbc->sync_mode == WB_SYNC_ALL) 424 424 err = nilfs_construct_segment(sb); 425 - else if (wbc->for_reclaim) 426 - nilfs_flush_segment(sb, inode->i_ino); 427 425 428 426 return err; 429 427 }
-16
fs/nilfs2/segment.c
··· 2221 2221 spin_unlock(&sci->sc_state_lock); 2222 2222 } 2223 2223 2224 - /** 2225 - * nilfs_flush_segment - trigger a segment construction for resource control 2226 - * @sb: super block 2227 - * @ino: inode number of the file to be flushed out. 2228 - */ 2229 - void nilfs_flush_segment(struct super_block *sb, ino_t ino) 2230 - { 2231 - struct the_nilfs *nilfs = sb->s_fs_info; 2232 - struct nilfs_sc_info *sci = nilfs->ns_writer; 2233 - 2234 - if (!sci || nilfs_doing_construction()) 2235 - return; 2236 - nilfs_segctor_do_flush(sci, NILFS_MDT_INODE(sb, ino) ? ino : 0); 2237 - /* assign bit 0 to data files */ 2238 - } 2239 - 2240 2224 struct nilfs_segctor_wait_request { 2241 2225 wait_queue_entry_t wq; 2242 2226 __u32 seq;
-1
fs/nilfs2/segment.h
··· 226 226 extern int nilfs_construct_segment(struct super_block *); 227 227 extern int nilfs_construct_dsync_segment(struct super_block *, struct inode *, 228 228 loff_t, loff_t); 229 - extern void nilfs_flush_segment(struct super_block *, ino_t); 230 229 extern int nilfs_clean_segments(struct super_block *, struct nilfs_argv *, 231 230 void **); 232 231