From 9efb17b7dc3d9a1cd9272a53c9f1d2e7cbb96fae Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 5 May 2005 13:33:01 -0700 Subject: [PATCH] --- yaml --- r: 942 b: refs/heads/master c: 775bf6c99a4ebde13bdb8dfa528ed241483b49ef h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_aops.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ac50d5f0a632..f9b6be54d5b1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 18e0a926ad7c5ab4ef05334230671c6975dac26b +refs/heads/master: 775bf6c99a4ebde13bdb8dfa528ed241483b49ef diff --git a/trunk/fs/xfs/linux-2.6/xfs_aops.c b/trunk/fs/xfs/linux-2.6/xfs_aops.c index 1e71a9633d8f..1edd3b694332 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_aops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_aops.c @@ -726,7 +726,7 @@ xfs_page_state_convert( pgoff_t end_index, last_index, tlast; int len, err, i, cnt = 0, uptodate = 1; int flags; - int page_dirty, delalloc = 0; + int page_dirty; /* wait for other IO threads? */ flags = (startio && wbc->sync_mode != WB_SYNC_NONE) ? 0 : BMAPI_TRYLOCK; @@ -807,7 +807,6 @@ xfs_page_state_convert( */ } else if (buffer_delay(bh)) { if (!iomp) { - delalloc = 1; err = xfs_map_blocks(inode, offset, len, &iomap, BMAPI_ALLOCATE | flags); if (err) { @@ -882,10 +881,9 @@ xfs_page_state_convert( xfs_submit_page(page, wbc, bh_arr, cnt, 0, 1); if (iomp) { - tlast = (iomp->iomap_offset + iomp->iomap_bsize - 1) >> + offset = (iomp->iomap_offset + iomp->iomap_bsize - 1) >> PAGE_CACHE_SHIFT; - if (delalloc && (tlast > last_index)) - tlast = last_index; + tlast = min_t(pgoff_t, offset, last_index); xfs_cluster_write(inode, page->index + 1, iomp, wbc, startio, unmapped, tlast); }