diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-31 18:34:22 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-31 18:34:22 +0200 |
commit | 6679ce6e5f519096612b480d255d9ca97be0c2be (patch) | |
tree | cce6814d3e7c62adf59e565fb6ae95fd409f86ab /mm/filemap.c | |
parent | 2c3d103ba90827cfb478bf10464d9b5b9cea369c (diff) | |
parent | 6e86841d05f371b5b9b86ce76c02aaee83352298 (diff) |
Merge branch 'linus' into sched/urgent
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 5de7633e1db..42bbc6909ba 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1023,8 +1023,17 @@ find_page: ra, filp, page, index, last_index - index); } - if (!PageUptodate(page)) - goto page_not_up_to_date; + if (!PageUptodate(page)) { + if (inode->i_blkbits == PAGE_CACHE_SHIFT || + !mapping->a_ops->is_partially_uptodate) + goto page_not_up_to_date; + if (TestSetPageLocked(page)) + goto page_not_up_to_date; + if (!mapping->a_ops->is_partially_uptodate(page, + desc, offset)) + goto page_not_up_to_date_locked; + unlock_page(page); + } page_ok: /* * i_size must be checked after we know the page is Uptodate. @@ -1094,6 +1103,7 @@ page_not_up_to_date: if (lock_page_killable(page)) goto readpage_eio; +page_not_up_to_date_locked: /* Did it get truncated before we got the lock? */ if (!page->mapping) { unlock_page(page); |