OSDN Git Service

ocfs2: Unlock mutex in local alloc failure case
authorSunil Mushran <sunil.mushran@oracle.com>
Fri, 21 Sep 2007 18:41:43 +0000 (11:41 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Wed, 3 Oct 2007 18:14:45 +0000 (11:14 -0700)
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 <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/localalloc.c

index de984d2..d272847 100644 (file)
@@ -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;