Subject: writeback: remove useless nonblocking checks in ->writepages From: Wu Fengguang Date: Fri Aug 20 07:04:54 CST 2010 This removes more deadcode that was somehow missed by commit 0d99519efef (writeback: remove unused nonblocking and congestion checks). The nonblocking checks in ->writepages are no longer used because the flusher now prefer to block on get_request_wait() than to skip inodes on IO congestion. The latter will lead to more seeky IO. CC: David Howells CC: Sage Weil CC: Steve French CC: Chris Mason CC: Jens Axboe CC: Christoph Hellwig Signed-off-by: Wu Fengguang --- fs/afs/write.c | 16 +--------------- fs/cifs/file.c | 10 ---------- 2 files changed, 1 insertion(+), 25 deletions(-) --- linux-next.orig/fs/afs/write.c 2010-06-24 14:32:01.000000000 +0800 +++ linux-next/fs/afs/write.c 2010-08-20 07:03:01.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; --- linux-next.orig/fs/cifs/file.c 2010-08-20 06:57:11.000000000 +0800 +++ linux-next/fs/cifs/file.c 2010-08-20 07:03:01.000000000 +0800 @@ -1379,16 +1379,6 @@ static int cifs_writepages(struct addres return generic_writepages(mapping, wbc); - /* - * BB: Is this meaningful for a non-block-device file system? - * If it is, we should test it again after we do I/O - */ - if (wbc->nonblocking && bdi_write_congested(bdi)) { - wbc->encountered_congestion = 1; - kfree(iov); - return 0; - } - xid = GetXid(); pagevec_init(&pvec, 0);