diff options
author | Dave Chinner <dchinner@redhat.com> | 2011-01-26 21:23:28 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-01-28 10:05:36 -0500 |
commit | c6f990d1ff8e4e53b12f4175eb7d7ea710c3ca73 (patch) | |
tree | 109e8d588a9a04ef52b97e751450fe0fffa88a23 /fs/xfs/xfs_trans.c | |
parent | 5315837daee7ed76c31ef643915f7d76ef8c1aa3 (diff) |
xfs: handle CIl transaction commit failures correctly
Failure to commit a transaction into the CIL is not handled
correctly. This currently can only happen when racing with a
shutdown and requires an explicit shutdown check, so it rare and can
be avoided. Remove the shutdown check and make the CIL commit a void
function to indicate it will always succeed, thereby removing the
incorrectly handled failure case.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 29f5e5424897..76922793f64f 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -1755,7 +1755,6 @@ xfs_trans_commit_cil( | |||
1755 | int flags) | 1755 | int flags) |
1756 | { | 1756 | { |
1757 | struct xfs_log_vec *log_vector; | 1757 | struct xfs_log_vec *log_vector; |
1758 | int error; | ||
1759 | 1758 | ||
1760 | /* | 1759 | /* |
1761 | * Get each log item to allocate a vector structure for | 1760 | * Get each log item to allocate a vector structure for |
@@ -1766,9 +1765,7 @@ xfs_trans_commit_cil( | |||
1766 | if (!log_vector) | 1765 | if (!log_vector) |
1767 | return ENOMEM; | 1766 | return ENOMEM; |
1768 | 1767 | ||
1769 | error = xfs_log_commit_cil(mp, tp, log_vector, commit_lsn, flags); | 1768 | xfs_log_commit_cil(mp, tp, log_vector, commit_lsn, flags); |
1770 | if (error) | ||
1771 | return error; | ||
1772 | 1769 | ||
1773 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); | 1770 | current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); |
1774 | xfs_trans_free(tp); | 1771 | xfs_trans_free(tp); |