diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2010-07-22 00:19:51 -0400 |
---|---|---|
committer | Wu Fengguang <fengguang.wu@intel.com> | 2011-06-07 20:25:23 -0400 |
commit | b7a2441f9966fe3e1be960a876ab52e6029ea005 (patch) | |
tree | f3e4373e6434bc21a4be983c3174aeb3298bf329 /fs/fs-writeback.c | |
parent | 3efaf0faba6793cd91298c76315e15de59c13ae0 (diff) |
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>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index d0553f33fb50..f43c479feee9 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -560,12 +560,8 @@ static int writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb, | |||
560 | iput(inode); | 560 | iput(inode); |
561 | cond_resched(); | 561 | cond_resched(); |
562 | spin_lock(&wb->list_lock); | 562 | spin_lock(&wb->list_lock); |
563 | if (wbc->nr_to_write <= 0) { | 563 | if (wbc->nr_to_write <= 0) |
564 | wbc->more_io = 1; | ||
565 | return 1; | 564 | return 1; |
566 | } | ||
567 | if (!list_empty(&wb->b_more_io)) | ||
568 | wbc->more_io = 1; | ||
569 | } | 565 | } |
570 | /* b_io is empty */ | 566 | /* b_io is empty */ |
571 | return 1; | 567 | return 1; |
@@ -708,7 +704,6 @@ static long wb_writeback(struct bdi_writeback *wb, | |||
708 | wbc.older_than_this = &oldest_jif; | 704 | wbc.older_than_this = &oldest_jif; |
709 | } | 705 | } |
710 | 706 | ||
711 | wbc.more_io = 0; | ||
712 | wbc.nr_to_write = write_chunk; | 707 | wbc.nr_to_write = write_chunk; |
713 | wbc.pages_skipped = 0; | 708 | wbc.pages_skipped = 0; |
714 | wbc.inodes_written = 0; | 709 | wbc.inodes_written = 0; |
@@ -740,7 +735,7 @@ static long wb_writeback(struct bdi_writeback *wb, | |||
740 | /* | 735 | /* |
741 | * No more inodes for IO, bail | 736 | * No more inodes for IO, bail |
742 | */ | 737 | */ |
743 | if (!wbc.more_io) | 738 | if (list_empty(&wb->b_more_io)) |
744 | break; | 739 | break; |
745 | /* | 740 | /* |
746 | * Nothing written. Wait for some inode to | 741 | * Nothing written. Wait for some inode to |