aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2008-12-23 15:21:30 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:30 -0500
commit136221fc3219b3805c48db5da065e8e3467175d4 (patch)
tree62fa68f46cb765143b6159993eceb30a6b81f9b2
parent3d44cc3e01ee1b40317f79ed54324e25c4f848df (diff)
nfs: remove redundant tests on reading new pages
aops->readpages() and its NFS helper readpage_async_filler() will only be called to do readahead I/O for newly allocated pages. So it's not necessary to test for the always 0 dirty/uptodate page flags. The removal of nfs_wb_page() call also fixes a readahead bug: the NFS readahead has been synchronous since 2.6.23, because that call will clear PG_readahead, which is the reminder for asynchronous readahead. More background: the PG_readahead page flag is shared with PG_reclaim, one for read path and the other for write path. clear_page_dirty_for_io() unconditionally clears PG_readahead to prevent possible readahead residuals, assuming itself to be always called in the write path. However, NFS is one and the only exception in that it _always_ calls clear_page_dirty_for_io() in the read path, i.e. for readpages()/readpage(). Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/read.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 40d17987d0e8..f856004bb7fa 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -533,12 +533,6 @@ readpage_async_filler(void *data, struct page *page)
533 unsigned int len; 533 unsigned int len;
534 int error; 534 int error;
535 535
536 error = nfs_wb_page(inode, page);
537 if (error)
538 goto out_unlock;
539 if (PageUptodate(page))
540 goto out_unlock;
541
542 len = nfs_page_length(page); 536 len = nfs_page_length(page);
543 if (len == 0) 537 if (len == 0)
544 return nfs_return_empty_page(page); 538 return nfs_return_empty_page(page);