浏览代码

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 <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Sunil Mushran 17 年之前
父节点
当前提交
bda0233b89
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fs/ocfs2/localalloc.c

+ 3 - 1
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;
 	ac->ac_bh = osb->local_alloc_bh;
 	status = 0;
 	status = 0;
 bail:
 bail:
-	if (status < 0 && local_alloc_inode)
+	if (status < 0 && local_alloc_inode) {
+		mutex_unlock(&local_alloc_inode->i_mutex);
 		iput(local_alloc_inode);
 		iput(local_alloc_inode);
+	}
 
 
 	mlog_exit(status);
 	mlog_exit(status);
 	return status;
 	return status;