diff options
-rw-r--r-- | fs/mpage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/mpage.c b/fs/mpage.c index 552b80b3facc..46e977efd50a 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -308,7 +308,10 @@ alloc_new: | |||
308 | goto alloc_new; | 308 | goto alloc_new; |
309 | } | 309 | } |
310 | 310 | ||
311 | if (buffer_boundary(map_bh) || (first_hole != blocks_per_page)) | 311 | relative_block = block_in_file - *first_logical_block; |
312 | nblocks = map_bh->b_size >> blkbits; | ||
313 | if ((buffer_boundary(map_bh) && relative_block == nblocks) || | ||
314 | (first_hole != blocks_per_page)) | ||
312 | bio = mpage_bio_submit(READ, bio); | 315 | bio = mpage_bio_submit(READ, bio); |
313 | else | 316 | else |
314 | *last_block_in_bio = blocks[blocks_per_page - 1]; | 317 | *last_block_in_bio = blocks[blocks_per_page - 1]; |