Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87510
b: refs/heads/master
c: 08ca0db
h: refs/heads/master
v: v3
  • Loading branch information
Dave Young authored and Linus Torvalds committed Mar 20, 2008
1 parent 4531806 commit 31d5aa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6b91919e0881a0d0a4ae5211d5c879a8c7ca92b
refs/heads/master: 08ca0db8aa2db4ddcf487d46d85dc8ffb22162cc
11 changes: 11 additions & 0 deletions trunk/fs/isofs/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ static int zisofs_readpage(struct file *file, struct page *page)
offset = index & ~zisofs_block_page_mask;
blockindex = offset >> zisofs_block_page_shift;
maxpage = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;

/*
* If this page is wholly outside i_size we just return zero;
* do_generic_file_read() will handle this for us
*/
if (page->index >= maxpage) {
SetPageUptodate(page);
unlock_page(page);
return 0;
}

maxpage = min(zisofs_block_pages, maxpage-offset);

for ( i = 0 ; i < maxpage ; i++, offset++ ) {
Expand Down

0 comments on commit 31d5aa4

Please sign in to comment.