aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index d8bd2c32f08a..bd944e893bbe 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -463,13 +463,6 @@ restart_all:
463 (unsigned long long)OCFS2_I(inode)->ip_blkno, i_size_read(inode), 463 (unsigned long long)OCFS2_I(inode)->ip_blkno, i_size_read(inode),
464 fe->i_clusters, clusters_to_add); 464 fe->i_clusters, clusters_to_add);
465 465
466 handle = ocfs2_alloc_handle(osb);
467 if (handle == NULL) {
468 status = -ENOMEM;
469 mlog_errno(status);
470 goto leave;
471 }
472
473 num_free_extents = ocfs2_num_free_extents(osb, 466 num_free_extents = ocfs2_num_free_extents(osb,
474 inode, 467 inode,
475 fe); 468 fe);
@@ -480,10 +473,7 @@ restart_all:
480 } 473 }
481 474
482 if (!num_free_extents) { 475 if (!num_free_extents) {
483 status = ocfs2_reserve_new_metadata(osb, 476 status = ocfs2_reserve_new_metadata(osb, fe, &meta_ac);
484 handle,
485 fe,
486 &meta_ac);
487 if (status < 0) { 477 if (status < 0) {
488 if (status != -ENOSPC) 478 if (status != -ENOSPC)
489 mlog_errno(status); 479 mlog_errno(status);
@@ -491,10 +481,7 @@ restart_all:
491 } 481 }
492 } 482 }
493 483
494 status = ocfs2_reserve_clusters(osb, 484 status = ocfs2_reserve_clusters(osb, clusters_to_add, &data_ac);
495 handle,
496 clusters_to_add,
497 &data_ac);
498 if (status < 0) { 485 if (status < 0) {
499 if (status != -ENOSPC) 486 if (status != -ENOSPC)
500 mlog_errno(status); 487 mlog_errno(status);
@@ -509,7 +496,7 @@ restart_all:
509 drop_alloc_sem = 1; 496 drop_alloc_sem = 1;
510 497
511 credits = ocfs2_calc_extend_credits(osb->sb, fe, clusters_to_add); 498 credits = ocfs2_calc_extend_credits(osb->sb, fe, clusters_to_add);
512 handle = ocfs2_start_trans(osb, handle, credits); 499 handle = ocfs2_start_trans(osb, NULL, credits);
513 if (IS_ERR(handle)) { 500 if (IS_ERR(handle)) {
514 status = PTR_ERR(handle); 501 status = PTR_ERR(handle);
515 handle = NULL; 502 handle = NULL;