From: Sunil Mushran Date: Fri, 21 Sep 2007 18:41:43 +0000 (-0700) Subject: ocfs2: Unlock mutex in local alloc failure case X-Git-Tag: v2.6.23~36 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bda0233b89c10ae46ccecb78bffdaf0fd7833d17;p=linux-2.6-omap-h63xx.git ocfs2: Unlock mutex in local alloc failure case 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 Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index de984d27257..d272847d5a0 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, 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;