[PATCH 04/12] writeback: remove unused nonblocking and congestion checks (afs)

From: Wu Fengguang
Date: Wed Nov 18 2009 - 03:33:58 EST


No one is calling wb_writeback and write_cache_pages with
wbc.nonblocking=1 any more. And lumpy pageout will want to do
nonblocking writeback without the congestion wait.

CC: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
---
fs/afs/write.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)

--- linux.orig/fs/afs/write.c 2009-11-06 09:36:28.000000000 +0800
+++ linux/fs/afs/write.c 2009-11-06 09:52:13.000000000 +0800
@@ -455,8 +455,6 @@ int afs_writepage(struct page *page, str
}

wbc->nr_to_write -= ret;
- if (wbc->nonblocking && bdi_write_congested(bdi))
- wbc->encountered_congestion = 1;

_leave(" = 0");
return 0;
@@ -529,11 +527,6 @@ static int afs_writepages_region(struct

wbc->nr_to_write -= ret;

- if (wbc->nonblocking && bdi_write_congested(bdi)) {
- wbc->encountered_congestion = 1;
- break;
- }
-
cond_resched();
} while (index < end && wbc->nr_to_write > 0);

@@ -554,18 +547,11 @@ int afs_writepages(struct address_space

_enter("");

- if (wbc->nonblocking && bdi_write_congested(bdi)) {
- wbc->encountered_congestion = 1;
- _leave(" = 0 [congest]");
- return 0;
- }
-
if (wbc->range_cyclic) {
start = mapping->writeback_index;
end = -1;
ret = afs_writepages_region(mapping, wbc, start, end, &next);
- if (start > 0 && wbc->nr_to_write > 0 && ret == 0 &&
- !(wbc->nonblocking && wbc->encountered_congestion))
+ if (start > 0 && wbc->nr_to_write > 0 && ret == 0)
ret = afs_writepages_region(mapping, wbc, 0, start,
&next);
mapping->writeback_index = next;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/