aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@sgi.com>2007-05-07 23:49:27 -0400
committerTim Shimmin <tes@sgi.com>2007-05-07 23:49:27 -0400
commitd3cf209476b72c83907a412b6708c5e498410aa7 (patch)
tree5e7a85751ae03b9eb3110e1cfc147b3492ae0fa5 /fs/xfs/xfs_inode.c
parent424ea91ba61c1cdc2dac68576c97030cbf47d84f (diff)
[XFS] propogate return codes from flush routines
This patch handles error return values in fs_flush_pages and fs_flushinval_pages. It changes the prototype of fs_flushinval_pages so we can propogate the errors and handle them at higher layers. I also modified xfs_itruncate_start so that it could propogate the error further. SGI-PV: 961990 SGI-Modid: xfs-linux-melb:xfs-kern:28231a Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Stewart Smith <stewart@flamingspork.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 3541d19859e1..7d1ab3967b8e 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1421,7 +1421,7 @@ xfs_itrunc_trace(
1421 * must be called again with all the same restrictions as the initial 1421 * must be called again with all the same restrictions as the initial
1422 * call. 1422 * call.
1423 */ 1423 */
1424void 1424int
1425xfs_itruncate_start( 1425xfs_itruncate_start(
1426 xfs_inode_t *ip, 1426 xfs_inode_t *ip,
1427 uint flags, 1427 uint flags,
@@ -1431,6 +1431,7 @@ xfs_itruncate_start(
1431 xfs_off_t toss_start; 1431 xfs_off_t toss_start;
1432 xfs_mount_t *mp; 1432 xfs_mount_t *mp;
1433 bhv_vnode_t *vp; 1433 bhv_vnode_t *vp;
1434 int error = 0;
1434 1435
1435 ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0); 1436 ASSERT(ismrlocked(&ip->i_iolock, MR_UPDATE) != 0);
1436 ASSERT((new_size == 0) || (new_size <= ip->i_d.di_size)); 1437 ASSERT((new_size == 0) || (new_size <= ip->i_d.di_size));
@@ -1468,7 +1469,7 @@ xfs_itruncate_start(
1468 * file size, so there is no way that the data extended 1469 * file size, so there is no way that the data extended
1469 * out there. 1470 * out there.
1470 */ 1471 */
1471 return; 1472 return 0;
1472 } 1473 }
1473 last_byte = xfs_file_last_byte(ip); 1474 last_byte = xfs_file_last_byte(ip);
1474 xfs_itrunc_trace(XFS_ITRUNC_START, ip, flags, new_size, toss_start, 1475 xfs_itrunc_trace(XFS_ITRUNC_START, ip, flags, new_size, toss_start,
@@ -1477,7 +1478,7 @@ xfs_itruncate_start(
1477 if (flags & XFS_ITRUNC_DEFINITE) { 1478 if (flags & XFS_ITRUNC_DEFINITE) {
1478 bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); 1479 bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED);
1479 } else { 1480 } else {
1480 bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); 1481 error = bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED);
1481 } 1482 }
1482 } 1483 }
1483 1484
@@ -1486,6 +1487,7 @@ xfs_itruncate_start(
1486 ASSERT(VN_CACHED(vp) == 0); 1487 ASSERT(VN_CACHED(vp) == 0);
1487 } 1488 }
1488#endif 1489#endif
1490 return error;
1489} 1491}
1490 1492
1491/* 1493/*