Skip to content

Commit

Permalink
ocfs2: Unlock mutex in local alloc failure case
Browse files Browse the repository at this point in the history
The fs was not unlocking the local alloc inode mutex in the code path in
which it failed to find a window of free bits in the global bitmap.

Signed-off-by: Sunil Mushran <[email protected]>
Signed-off-by: Mark Fasheh <[email protected]>
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Oct 3, 2007
1 parent f778089 commit bda0233
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ocfs2/localalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,10 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
ac->ac_bh = osb->local_alloc_bh;
status = 0;
bail:
if (status < 0 && local_alloc_inode)
if (status < 0 && local_alloc_inode) {
mutex_unlock(&local_alloc_inode->i_mutex);
iput(local_alloc_inode);
}

mlog_exit(status);
return status;
Expand Down

0 comments on commit bda0233

Please sign in to comment.