From 1c72bf90037f32fc2b10e0a05dff2640abce8ee2 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 8 May 2007 13:48:42 +1000 Subject: [XFS] The last argument "lsn" of xfs_trans_commit() is always called with NULL. Patch provided by Eric Sandeen. SGI-PV: 961693 SGI-Modid: xfs-linux-melb:xfs-kern:28199a Signed-off-by: Eric Sandeen Signed-off-by: Lachlan McIlroy Signed-off-by: Tim Shimmin --- fs/xfs/xfs_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/xfs/xfs_utils.c') diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 9014d7e4448..948b0c892e9 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c @@ -222,7 +222,7 @@ xfs_dir_ialloc( } ntp = xfs_trans_dup(tp); - code = xfs_trans_commit(tp, 0, NULL); + code = xfs_trans_commit(tp, 0); tp = ntp; if (committed != NULL) { *committed = 1; @@ -460,8 +460,7 @@ xfs_truncate_file( XFS_TRANS_ABORT); } else { xfs_ichgtime(ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); - error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, - NULL); + error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); } xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); -- cgit v1.2.3 From d3cf209476b72c83907a412b6708c5e498410aa7 Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Tue, 8 May 2007 13:49:27 +1000 Subject: [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 Signed-off-by: Stewart Smith Signed-off-by: Tim Shimmin --- fs/xfs/xfs_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fs/xfs/xfs_utils.c') diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 948b0c892e9..20ffec308e1 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c @@ -420,7 +420,11 @@ xfs_truncate_file( * in a transaction. */ xfs_ilock(ip, XFS_IOLOCK_EXCL); - xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0); + error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)0); + if (error) { + xfs_iunlock(ip, XFS_IOLOCK_EXCL); + return error; + } tp = xfs_trans_alloc(mp, XFS_TRANS_TRUNCATE_FILE); if ((error = xfs_trans_reserve(tp, 0, XFS_ITRUNCATE_LOG_RES(mp), 0, -- cgit v1.2.3