diff options
author | Lachlan McIlroy <lachlan@sgi.com> | 2007-05-07 23:49:27 -0400 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-05-07 23:49:27 -0400 |
commit | d3cf209476b72c83907a412b6708c5e498410aa7 (patch) | |
tree | 5e7a85751ae03b9eb3110e1cfc147b3492ae0fa5 /fs/xfs/xfs_utils.c | |
parent | 424ea91ba61c1cdc2dac68576c97030cbf47d84f (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_utils.c')
-rw-r--r-- | fs/xfs/xfs_utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 948b0c892e96..20ffec308e1e 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c | |||
@@ -420,7 +420,11 @@ xfs_truncate_file( | |||
420 | * in a transaction. | 420 | * in a transaction. |
421 | */ | 421 | */ |
422 | xfs_ilock(ip, XFS_IOLOCK_EXCL); | 422 | xfs_ilock(ip, XFS_IOLOCK_EXCL); |
423 | xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0); | 423 | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0); |
424 | if (error) { | ||
425 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | ||
426 | return error; | ||
427 | } | ||
424 | 428 | ||
425 | tp = xfs_trans_alloc(mp, XFS_TRANS_TRUNCATE_FILE); | 429 | tp = xfs_trans_alloc(mp, XFS_TRANS_TRUNCATE_FILE); |
426 | if ((error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, | 430 | if ((error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, |