Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party NuttX
提交
719ebdda
T
Third Party NuttX
项目概览
OpenHarmony
/
Third Party NuttX
大约 1 年 前同步成功
通知
5
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party NuttX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
719ebdda
编写于
4月 21, 2021
作者:
C
chenwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: kernel crashed after rmdir the umounted folder
Close: I3NGBT Change-Id: I0c3ae0f389cabccc6ffa7a79b96ba6b028168dca
上级
6c0ff6f7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
4 addition
and
16 deletion
+4
-16
fs/dirent/fs_opendir.c
fs/dirent/fs_opendir.c
+1
-1
fs/mount/fs_mount.c
fs/mount/fs_mount.c
+2
-0
fs/mount/fs_umount.c
fs/mount/fs_umount.c
+0
-7
fs/vfs/fs_mkdir.c
fs/vfs/fs_mkdir.c
+0
-7
fs/vfs/fs_open.c
fs/vfs/fs_open.c
+1
-1
未找到文件。
fs/dirent/fs_opendir.c
浏览文件 @
719ebdda
...
...
@@ -130,7 +130,7 @@ DIR *opendir(const char *path)
}
if
(
ret
<
0
)
{
goto
errout
;
goto
errout
_with_count
;
}
dir
->
fd_status
=
DIRENT_MAGIC
;
dir
->
fd_root
=
vp
;
...
...
fs/mount/fs_mount.c
浏览文件 @
719ebdda
...
...
@@ -259,7 +259,9 @@ int mount(const char *source, const char *target,
mnt
=
MountAlloc
(
mountpt_vnode
,
(
struct
MountOps
*
)
mops
);
mountpt_vnode
->
useCount
++
;
ret
=
mops
->
Mount
(
mnt
,
device
,
data
);
mountpt_vnode
->
useCount
--
;
if
(
ret
!=
0
)
{
/* The vnode is unhappy with the blkdrvr for some reason. Back out
...
...
fs/mount/fs_umount.c
浏览文件 @
719ebdda
...
...
@@ -85,9 +85,6 @@ BOOL fs_in_use(struct Mount *mnt, const char *target)
return
VnodeInUseIter
(
mnt
->
vnodeCovered
);
}
struct
Vnode
*
g_coveredVnodeList
[
100
];
int
g_coveredVnodeTop
=
0
;
int
umount
(
const
char
*
target
)
{
struct
Vnode
*
mountpt_vnode
=
NULL
;
...
...
@@ -195,10 +192,6 @@ int umount(const char *target)
#endif
covered_vnode
->
newMount
=
NULL
;
covered_vnode
->
flag
&=
~
(
VNODE_FLAG_MOUNT_NEW
);
if
(
g_coveredVnodeTop
<
100
)
{
g_coveredVnodeList
[
g_coveredVnodeTop
++
]
=
covered_vnode
;
}
VnodeDrop
();
return
OK
;
...
...
fs/vfs/fs_mkdir.c
浏览文件 @
719ebdda
...
...
@@ -50,8 +50,6 @@
#include "fs/path_cache.h"
#include "fs/vfs_util.h"
struct
Vnode
*
g_parentOfCoveredVnode
=
NULL
;
/****************************************************************************
* Private Functions
****************************************************************************/
...
...
@@ -141,11 +139,6 @@ int do_mkdir(int dirfd, const char *pathname, mode_t mode)
// alloc name cache failed is not a critical problem, let it go.
PRINT_ERR
(
"alloc path cache %s failed
\n
"
,
dirname
);
}
if
(
!
strcmp
(
dirname
,
"kernel"
))
{
PRINT_ERR
(
"%s-%d: vnode_of_kernel: %p, inode=%p
\n
"
,
__FUNCTION__
,
__LINE__
,
vnode
,
vnode
->
data
);
g_parentOfCoveredVnode
=
vnode
;
}
parentVnode
->
useCount
--
;
VnodeDrop
();
out:
...
...
fs/vfs/fs_open.c
浏览文件 @
719ebdda
...
...
@@ -158,6 +158,7 @@ static int do_creat(struct Vnode **node, char *fullpath, mode_t mode)
ret
=
-
ENOSYS
;
}
parentNode
->
useCount
--
;
if
(
ret
<
0
)
{
return
ret
;
...
...
@@ -235,7 +236,6 @@ int fp_open(char *fullpath, int oflags, mode_t mode)
goto
errout_without_count
;
}
ret
=
do_creat
(
&
vnode
,
fullpath
,
mode
);
vnode
->
useCount
--
;
if
(
ret
!=
OK
)
{
VnodeDrop
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录