Skip to content

Commit 84e4376

Browse files
Christoph Hellwigakpm00
authored andcommitted
nilfs2: remove wbc->for_reclaim handling
Since commit 013a070 ("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/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Ryusuke Konishi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8e02b1b commit 84e4376

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

fs/nilfs2/mdt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ static int nilfs_mdt_write_folio(struct folio *folio,
422422

423423
if (wbc->sync_mode == WB_SYNC_ALL)
424424
err = nilfs_construct_segment(sb);
425-
else if (wbc->for_reclaim)
426-
nilfs_flush_segment(sb, inode->i_ino);
427425

428426
return err;
429427
}

fs/nilfs2/segment.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,22 +2221,6 @@ static void nilfs_segctor_do_flush(struct nilfs_sc_info *sci, int bn)
22212221
spin_unlock(&sci->sc_state_lock);
22222222
}
22232223

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-
22402224
struct nilfs_segctor_wait_request {
22412225
wait_queue_entry_t wq;
22422226
__u32 seq;

fs/nilfs2/segment.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ extern void nilfs_relax_pressure_in_lock(struct super_block *);
226226
extern int nilfs_construct_segment(struct super_block *);
227227
extern int nilfs_construct_dsync_segment(struct super_block *, struct inode *,
228228
loff_t, loff_t);
229-
extern void nilfs_flush_segment(struct super_block *, ino_t);
230229
extern int nilfs_clean_segments(struct super_block *, struct nilfs_argv *,
231230
void **);
232231

0 commit comments

Comments
 (0)