diff options
author | Nathan Scott <nathans@sgi.com> | 2005-05-05 16:33:01 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@melbourne.sgi.com> | 2005-05-05 16:33:01 -0400 |
commit | 775bf6c99a4ebde13bdb8dfa528ed241483b49ef (patch) | |
tree | 21a27aa8304751ef7e71ae9131da6ddd0b2c4a80 /fs/xfs/linux-2.6/xfs_aops.c | |
parent | 18e0a926ad7c5ab4ef05334230671c6975dac26b (diff) |
[XFS] Do not do delalloc conversion on pages beyond EOF ever, not just sometimes
SGI Modid: xfs-linux:xfs-kern:22376a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 1e71a9633d8f..1edd3b694332 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -726,7 +726,7 @@ xfs_page_state_convert( | |||
726 | pgoff_t end_index, last_index, tlast; | 726 | pgoff_t end_index, last_index, tlast; |
727 | int len, err, i, cnt = 0, uptodate = 1; | 727 | int len, err, i, cnt = 0, uptodate = 1; |
728 | int flags; | 728 | int flags; |
729 | int page_dirty, delalloc = 0; | 729 | int page_dirty; |
730 | 730 | ||
731 | /* wait for other IO threads? */ | 731 | /* wait for other IO threads? */ |
732 | flags = (startio && wbc->sync_mode != WB_SYNC_NONE) ? 0 : BMAPI_TRYLOCK; | 732 | flags = (startio && wbc->sync_mode != WB_SYNC_NONE) ? 0 : BMAPI_TRYLOCK; |
@@ -807,7 +807,6 @@ xfs_page_state_convert( | |||
807 | */ | 807 | */ |
808 | } else if (buffer_delay(bh)) { | 808 | } else if (buffer_delay(bh)) { |
809 | if (!iomp) { | 809 | if (!iomp) { |
810 | delalloc = 1; | ||
811 | err = xfs_map_blocks(inode, offset, len, &iomap, | 810 | err = xfs_map_blocks(inode, offset, len, &iomap, |
812 | BMAPI_ALLOCATE | flags); | 811 | BMAPI_ALLOCATE | flags); |
813 | if (err) { | 812 | if (err) { |
@@ -882,10 +881,9 @@ xfs_page_state_convert( | |||
882 | xfs_submit_page(page, wbc, bh_arr, cnt, 0, 1); | 881 | xfs_submit_page(page, wbc, bh_arr, cnt, 0, 1); |
883 | 882 | ||
884 | if (iomp) { | 883 | if (iomp) { |
885 | tlast = (iomp->iomap_offset + iomp->iomap_bsize - 1) >> | 884 | offset = (iomp->iomap_offset + iomp->iomap_bsize - 1) >> |
886 | PAGE_CACHE_SHIFT; | 885 | PAGE_CACHE_SHIFT; |
887 | if (delalloc && (tlast > last_index)) | 886 | tlast = min_t(pgoff_t, offset, last_index); |
888 | tlast = last_index; | ||
889 | xfs_cluster_write(inode, page->index + 1, iomp, wbc, | 887 | xfs_cluster_write(inode, page->index + 1, iomp, wbc, |
890 | startio, unmapped, tlast); | 888 | startio, unmapped, tlast); |
891 | } | 889 | } |