[PATCH 1/3] mm/readahead: Change the check for PageReadahead into an else-if

From: Raghavendra D Prabhu
Date: Sat Jul 09 2011 - 15:42:02 EST


>From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
async readahead into its readahead window, so another checking for that again is
not required.

Signed-off-by: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
---
mm/filemap.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index a8251a8..074c23d 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1115,8 +1115,7 @@ find_page:
page = find_get_page(mapping, index);
if (unlikely(page == NULL))
goto no_cached_page;
- }
- if (PageReadahead(page)) {
+ } else if (PageReadahead(page)) {
page_cache_async_readahead(mapping,
ra, filp, page,
index, last_index - index);
--
1.7.6

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