summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_aops.c
diff options
context:
space:
mode:
authorDave Chinner2016-05-20 02:31:52 +0200
committerDave Chinner2016-05-20 02:31:52 +0200
commitd6bd9615abdf89b147eb200ea4f63156af8a279e (patch)
treec9f1bcd755fe58aa61bcd8f440a6b0350fd80cd4 /fs/xfs/xfs_aops.c
parentMerge branch 'xfs-4.7-writeback-bio' into for-next (diff)
parentxfs: remove transaction types (diff)
downloadkernel-qcow2-linux-d6bd9615abdf89b147eb200ea4f63156af8a279e.tar.gz
kernel-qcow2-linux-d6bd9615abdf89b147eb200ea4f63156af8a279e.tar.xz
kernel-qcow2-linux-d6bd9615abdf89b147eb200ea4f63156af8a279e.zip
Merge branch 'xfs-4.7-trans-type-cleanup' into for-next
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r--fs/xfs/xfs_aops.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 736461a861b1..1d6eca54f016 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -168,13 +168,9 @@ xfs_setfilesize_trans_alloc(
struct xfs_trans *tp;
int error;
- tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
-
- error = xfs_trans_reserve(tp, &M_RES(mp)->tr_fsyncts, 0, 0);
- if (error) {
- xfs_trans_cancel(tp);
+ error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp);
+ if (error)
return error;
- }
ioend->io_append_trans = tp;
@@ -1397,13 +1393,10 @@ xfs_end_io_direct_write(
trace_xfs_end_io_direct_write_append(ip, offset, size);
- tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
- error = xfs_trans_reserve(tp, &M_RES(mp)->tr_fsyncts, 0, 0);
- if (error) {
- xfs_trans_cancel(tp);
- return error;
- }
- error = xfs_setfilesize(ip, tp, offset, size);
+ error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0,
+ &tp);
+ if (!error)
+ error = xfs_setfilesize(ip, tp, offset, size);
}
return error;