aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/localalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r--fs/ocfs2/localalloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 4dedd9789108..545f7892cdf3 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -471,9 +471,6 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
471 471
472 mutex_lock(&local_alloc_inode->i_mutex); 472 mutex_lock(&local_alloc_inode->i_mutex);
473 473
474 ac->ac_inode = local_alloc_inode;
475 ac->ac_which = OCFS2_AC_USE_LOCAL;
476
477 if (osb->local_alloc_state != OCFS2_LA_ENABLED) { 474 if (osb->local_alloc_state != OCFS2_LA_ENABLED) {
478 status = -ENOSPC; 475 status = -ENOSPC;
479 goto bail; 476 goto bail;
@@ -511,10 +508,14 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
511 } 508 }
512 } 509 }
513 510
511 ac->ac_inode = local_alloc_inode;
512 ac->ac_which = OCFS2_AC_USE_LOCAL;
514 get_bh(osb->local_alloc_bh); 513 get_bh(osb->local_alloc_bh);
515 ac->ac_bh = osb->local_alloc_bh; 514 ac->ac_bh = osb->local_alloc_bh;
516 status = 0; 515 status = 0;
517bail: 516bail:
517 if (status < 0 && local_alloc_inode)
518 iput(local_alloc_inode);
518 519
519 mlog_exit(status); 520 mlog_exit(status);
520 return status; 521 return status;