summaryrefslogtreecommitdiff
path: root/fs/mpage.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2009-01-08 02:22:55 (GMT)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2009-01-08 02:22:55 (GMT)
commit6206aa8b2b9a45b4cf3ee31b7209b014be349fd9 (patch)
tree72c4223a2cc21bf055948eadb3b314ed0568ae9d /fs/mpage.c
parent95f8e302c04c0b0c6de35ab399a5551605eeb006 (diff)
parent9e42d0cf5020aaf217433cad1a224745241d212a (diff)
downloadlinux-6206aa8b2b9a45b4cf3ee31b7209b014be349fd9.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/mpage.c')
-rw-r--r--fs/mpage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/mpage.c b/fs/mpage.c
index 552b80b..16c3ef3 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -241,7 +241,6 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
first_hole = page_block;
page_block++;
block_in_file++;
- clear_buffer_mapped(map_bh);
continue;
}
@@ -308,7 +307,10 @@ alloc_new:
goto alloc_new;
}
- if (buffer_boundary(map_bh) || (first_hole != blocks_per_page))
+ relative_block = block_in_file - *first_logical_block;
+ nblocks = map_bh->b_size >> blkbits;
+ if ((buffer_boundary(map_bh) && relative_block == nblocks) ||
+ (first_hole != blocks_per_page))
bio = mpage_bio_submit(READ, bio);
else
*last_block_in_bio = blocks[blocks_per_page - 1];