From 7e4b870c129422f2f565425c6ec522a38efae255 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 21 Jul 2011 15:02:43 +0100 Subject: [PATCH] --- yaml --- r: 255027 b: refs/heads/master c: b307d4655a71749ac3f91c6dbe33d28cc026ceeb h: refs/heads/master i: 255025: 8e86bc4cc6943b4b97f19d7e8061ce3cbafb25bb 255023: 7996c7542d3ff160f4a0d7cb613b09fa40db7477 v: v3 --- [refs] | 2 +- trunk/fs/fscache/page.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index c760048a4699..2716636770f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cf6ace16a3cd8b728fb0afa68368fd40bbeae19f +refs/heads/master: b307d4655a71749ac3f91c6dbe33d28cc026ceeb diff --git a/trunk/fs/fscache/page.c b/trunk/fs/fscache/page.c index 2f343b4d7a7d..3f7a59bfa7ad 100644 --- a/trunk/fs/fscache/page.c +++ b/trunk/fs/fscache/page.c @@ -976,16 +976,12 @@ void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie, pagevec_init(&pvec, 0); next = 0; - while (next <= (loff_t)-1 && - pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE) - ) { + do { + if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) + break; for (i = 0; i < pagevec_count(&pvec); i++) { struct page *page = pvec.pages[i]; - pgoff_t page_index = page->index; - - ASSERTCMP(page_index, >=, next); - next = page_index + 1; - + next = page->index; if (PageFsCache(page)) { __fscache_wait_on_page_write(cookie, page); __fscache_uncache_page(cookie, page); @@ -993,7 +989,7 @@ void __fscache_uncache_all_inode_pages(struct fscache_cookie *cookie, } pagevec_release(&pvec); cond_resched(); - } + } while (++next); _leave(""); }