summaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_aops.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2005-05-05 13:33:01 -0700
committerChristoph Hellwig <hch@melbourne.sgi.com>2005-05-05 13:33:01 -0700
commit775bf6c99a4ebde13bdb8dfa528ed241483b49ef (patch)
tree21a27aa8304751ef7e71ae9131da6ddd0b2c4a80 /fs/xfs/linux-2.6/xfs_aops.c
parent18e0a926ad7c5ab4ef05334230671c6975dac26b (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.c8
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 1e71a9633d8..1edd3b69433 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(
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);
}