ocfs2: lighten up allocate transaction
[firefly-linux-kernel-4.4.55.git] / fs / ocfs2 / file.c
index 3261d71319eeb27d3a569aeccf4f3f6e27a95496..409c549ae02aabe31cb3a81d0e8eeb9a364245b4 100644 (file)
@@ -671,11 +671,7 @@ restarted_transaction:
                } else {
                        BUG_ON(why != RESTART_TRANS);
 
-                       /* TODO: This can be more intelligent. */
-                       credits = ocfs2_calc_extend_credits(osb->sb,
-                                                           &fe->id2.i_list,
-                                                           clusters_to_add);
-                       status = ocfs2_extend_trans(handle, credits);
+                       status = ocfs2_allocate_extend_trans(handle, 1);
                        if (status < 0) {
                                /* handle still has to be committed at
                                 * this point. */