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:
Wu Fengguang
2010-07-21 22:19:51 -06:00
parent 3efaf0faba
commit b7a2441f99
4 changed files with 5 additions and 16 deletions

View File

@ -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