提交 9b2b700f 编写于 作者: F Far 提交者: Gitee

fix: some branch in format does not release the vnode mutex properly

if fatfs_mkfs returns a error, format may return without drop the vnode mutex, which may cause deadlock

Close #I3OFAY
上级 f32caa52
......@@ -78,6 +78,7 @@ int format(const char *dev, int sectors, int option)
}
err = fatfs_mkfs(device, sectors, option);
if (err < 0) {
VnodeDrop();
set_errno(-err);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册