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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 545f7892cdf3..d272847d5a07 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -514,8 +514,10 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
514 ac->ac_bh = osb->local_alloc_bh; 514 ac->ac_bh = osb->local_alloc_bh;
515 status = 0; 515 status = 0;
516bail: 516bail:
517 if (status < 0 && local_alloc_inode) 517 if (status < 0 && local_alloc_inode) {
518 mutex_unlock(&local_alloc_inode->i_mutex);
518 iput(local_alloc_inode); 519 iput(local_alloc_inode);
520 }
519 521
520 mlog_exit(status); 522 mlog_exit(status);
521 return status; 523 return status;
@@ -524,13 +526,12 @@ bail:
524int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, 526int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
525 handle_t *handle, 527 handle_t *handle,
526 struct ocfs2_alloc_context *ac, 528 struct ocfs2_alloc_context *ac,
527 u32 min_bits, 529 u32 bits_wanted,
528 u32 *bit_off, 530 u32 *bit_off,
529 u32 *num_bits) 531 u32 *num_bits)
530{ 532{
531 int status, start; 533 int status, start;
532 struct inode *local_alloc_inode; 534 struct inode *local_alloc_inode;
533 u32 bits_wanted;
534 void *bitmap; 535 void *bitmap;
535 struct ocfs2_dinode *alloc; 536 struct ocfs2_dinode *alloc;
536 struct ocfs2_local_alloc *la; 537 struct ocfs2_local_alloc *la;
@@ -538,7 +539,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb,
538 mlog_entry_void(); 539 mlog_entry_void();
539 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); 540 BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL);
540 541
541 bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given;
542 local_alloc_inode = ac->ac_inode; 542 local_alloc_inode = ac->ac_inode;
543 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; 543 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
544 la = OCFS2_LOCAL_ALLOC(alloc); 544 la = OCFS2_LOCAL_ALLOC(alloc);