diff options
author | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:31:52 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-20 10:31:52 +1000 |
commit | d6bd9615abdf89b147eb200ea4f63156af8a279e (patch) | |
tree | c9f1bcd755fe58aa61bcd8f440a6b0350fd80cd4 /fs/xfs/xfs_file.c | |
parent | 8b7a242e53e20dc3f2a071ff4d3d8dfa063174dd (diff) | |
parent | 710b1e2c2948c1e5d0499def5273ecbc6472342d (diff) |
Merge branch 'xfs-4.7-trans-type-cleanup' into for-next
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index ac0fd32de31e..98bbd8f84c76 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -145,12 +145,10 @@ xfs_update_prealloc_flags( struct xfs_trans *tp; int error; - tp = xfs_trans_alloc(ip->i_mount, XFS_TRANS_WRITEID); - error = xfs_trans_reserve(tp, &M_RES(ip->i_mount)->tr_writeid, 0, 0); - if (error) { - xfs_trans_cancel(tp); + error = xfs_trans_alloc(ip->i_mount, &M_RES(ip->i_mount)->tr_writeid, + 0, 0, 0, &tp); + if (error) return error; - } xfs_ilock(ip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); |