writeback: remove writeback_control.more_io
When wbc.more_io was first introduced, it indicates whether there are at least one superblock whose s_more_io contains more IO work. Now with the per-bdi writeback, it can be replaced with a simple b_more_io test. Acked-by: Jan Kara <jack@suse.cz> Acked-by: Mel Gorman <mel@csn.ul.ie> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
This commit is contained in:
@ -560,12 +560,8 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb,
|
||||
iput(inode);
|
||||
cond_resched();
|
||||
spin_lock(&wb->list_lock);
|
||||
if (wbc->nr_to_write <= 0) {
|
||||
wbc->more_io = 1;
|
||||
if (wbc->nr_to_write <= 0)
|
||||
return 1;
|
||||
}
|
||||
if (!list_empty(&wb->b_more_io))
|
||||
wbc->more_io = 1;
|
||||
}
|
||||
/* b_io is empty */
|
||||
return 1;
|
||||
@ -708,7 +704,6 @@ static long wb_writeback(struct bdi_writeback *wb,
|
||||
wbc.older_than_this = &oldest_jif;
|
||||
}
|
||||
|
||||
wbc.more_io = 0;
|
||||
wbc.nr_to_write = write_chunk;
|
||||
wbc.pages_skipped = 0;
|
||||
wbc.inodes_written = 0;
|
||||
@ -740,7 +735,7 @@ static long wb_writeback(struct bdi_writeback *wb,
|
||||
/*
|
||||
* No more inodes for IO, bail
|
||||
*/
|
||||
if (!wbc.more_io)
|
||||
if (list_empty(&wb->b_more_io))
|
||||
break;
|
||||
/*
|
||||
* Nothing written. Wait for some inode to
|
||||
|
Reference in New Issue
Block a user