diff options
author | John Stultz <john.stultz@linaro.org> | 2011-07-25 09:58:06 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-07-25 09:58:06 -0700 |
commit | 21a602b5cdc203cbcf8bbeeb26edeb3de7c65955 (patch) | |
tree | 8618b4a8882f78076a779ebb416b54332cc213db /fs/fscache/page.c | |
parent | 1a3807e5a6bea7e4b195fbb399bbc09e73230d4c (diff) | |
parent | 81f6236c4811b2b2b3ea64a306c071f76788ac4b (diff) |
Merge branch 'upstream/linaro-3.0' into linaro-android-3.0linux-linaro-3.0-2011.07-1-android-0
Diffstat (limited to 'fs/fscache/page.c')
-rw-r--r-- | fs/fscache/page.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index 2f343b4d7a7..3f7a59bfa7a 100644 --- a/fs/fscache/page.c +++ b/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(""); } |