xfs: better xfs_trans_alloc interface
[deliverable/linux.git] / fs / xfs / xfs_fsops.c
index ee3aaa0a53179f761ffffe6257a58b637a6b7dc8..9c563d480b3c1535f0f5535cd4932d4b287aad58 100644 (file)
@@ -198,14 +198,10 @@ xfs_growfs_data_private(
                        return error;
        }
 
-       tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS);
-       tp->t_flags |= XFS_TRANS_RESERVE;
-       error = xfs_trans_reserve(tp, &M_RES(mp)->tr_growdata,
-                                 XFS_GROWFS_SPACE_RES(mp), 0);
-       if (error) {
-               xfs_trans_cancel(tp);
+       error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growdata,
+                       XFS_GROWFS_SPACE_RES(mp), 0, XFS_TRANS_RESERVE, &tp);
+       if (error)
                return error;
-       }
 
        /*
         * Write new AG headers to disk. Non-transactional, but written
This page took 0.025249 seconds and 5 git commands to generate.