Commit 8d5aa29e authored by Stephen Lord's avatar Stephen Lord Committed by Stephen Lord

[XFS] When calculating the number of pages to probe for an unwritten extent,

use the size of the extent, not the page count of the pagebuf which is
initialized to zero.

SGI Modid: 2.5.x-xfs:slinx:159206a
parent 4e1eaa31
......@@ -461,7 +461,8 @@ map_unwritten(
struct page *page;
tlast = i_size_read(inode) >> PAGE_CACHE_SHIFT;
tloff = min(tlast, start_page->index + pb->pb_page_count - 1);
tloff = (mp->pbm_offset + mp->pbm_bsize) >> PAGE_CACHE_SHIFT;
tloff = min(tlast, tloff);
for (tindex = start_page->index + 1; tindex < tloff; tindex++) {
page = probe_unwritten_page(mapping, tindex, mp, pb,
PAGE_CACHE_SIZE, &bs, bbits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment