From af4de4d3ffbfef097b8f8a6cba6df60d6665d6f5 Mon Sep 17 00:00:00 2001 From: David Chinner Date: Thu, 10 Apr 2008 12:21:59 +1000 Subject: [PATCH] --- yaml --- r: 89427 b: refs/heads/master c: 7c9ef85c5672ae316aafd7bbe0bbadebe90301e6 h: refs/heads/master i: 89425: d6e60a8b0ef3fdb6908eaa4b795b6ea97eba1ef3 89423: bd0ef61742f4010817ab7159c102f7a5c0d270ed v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_iomap.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 963bd443dea7..a5b9d8d03f43 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc6149d8d9634814cdcd9283b8f2efd3359181df +refs/heads/master: 7c9ef85c5672ae316aafd7bbe0bbadebe90301e6 diff --git a/trunk/fs/xfs/xfs_iomap.c b/trunk/fs/xfs/xfs_iomap.c index fde37f87d52f..fb3cf1191419 100644 --- a/trunk/fs/xfs/xfs_iomap.c +++ b/trunk/fs/xfs/xfs_iomap.c @@ -802,8 +802,11 @@ xfs_iomap_write_allocate( */ nimaps = 1; end_fsb = XFS_B_TO_FSB(mp, ip->i_size); - xfs_bmap_last_offset(NULL, ip, &last_block, - XFS_DATA_FORK); + error = xfs_bmap_last_offset(NULL, ip, &last_block, + XFS_DATA_FORK); + if (error) + goto trans_cancel; + last_block = XFS_FILEOFF_MAX(last_block, end_fsb); if ((map_start_fsb + count_fsb) > last_block) { count_fsb = last_block - map_start_fsb;