aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.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_vnodeops.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_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 5ed349eccb00..6e49bd362460 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -1257,8 +1257,12 @@ xfs_inactive_free_eofblocks(
1257 * do that within a transaction. 1257 * do that within a transaction.
1258 */ 1258 */
1259 xfs_ilock(ip, XFS_IOLOCK_EXCL); 1259 xfs_ilock(ip, XFS_IOLOCK_EXCL);
1260 xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 1260 error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE,
1261 ip->i_d.di_size); 1261 ip->i_d.di_size);
1262 if (error) {
1263 xfs_iunlock(ip, XFS_IOLOCK_EXCL);
1264 return error;
1265 }
1262 1266
1263 error = xfs_trans_reserve(tp, 0, 1267 error = xfs_trans_reserve(tp, 0,
1264 XFS_ITRUNCATE_LOG_RES(mp), 1268 XFS_ITRUNCATE_LOG_RES(mp),
@@ -1674,7 +1678,11 @@ xfs_inactive(
1674 */ 1678 */
1675 xfs_ilock(ip, XFS_IOLOCK_EXCL); 1679 xfs_ilock(ip, XFS_IOLOCK_EXCL);
1676 1680
1677 xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0); 1681 error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0);
1682 if (error) {
1683 xfs_iunlock(ip, XFS_IOLOCK_EXCL);
1684 return VN_INACTIVE_CACHE;
1685 }
1678 1686
1679 error = xfs_trans_reserve(tp, 0, 1687 error = xfs_trans_reserve(tp, 0,
1680 XFS_ITRUNCATE_LOG_RES(mp), 1688 XFS_ITRUNCATE_LOG_RES(mp),
@@ -4338,8 +4346,10 @@ xfs_free_file_space(
4338 if (VN_CACHED(vp) != 0) { 4346 if (VN_CACHED(vp) != 0) {
4339 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, 4347 xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1,
4340 ctooff(offtoct(ioffset)), -1); 4348 ctooff(offtoct(ioffset)), -1);
4341 bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), 4349 error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)),
4342 -1, FI_REMAPF_LOCKED); 4350 -1, FI_REMAPF_LOCKED);
4351 if (error)
4352 goto out_unlock_iolock;
4343 } 4353 }
4344 4354
4345 /* 4355 /*