fs: Skip the enumeration of root directory in foreach_inode
ensure the behaviour same before:
commit b76c4672d6
(origin/root)
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Tue Sep 15 17:42:42 2020 +0800
vfs: Create a node as the root of pseudo file system
to remove the special process for root
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
73f0530912
commit
b422f49fa7
|
@ -186,7 +186,7 @@ int foreach_inode(foreach_inode_t handler, FAR void *arg)
|
|||
ret = inode_semtake();
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = foreach_inodelevel(g_root_inode, info);
|
||||
ret = foreach_inodelevel(g_root_inode->i_child, info);
|
||||
inode_semgive();
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ int foreach_inode(foreach_inode_t handler, FAR void *arg)
|
|||
ret = inode_semtake();
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = foreach_inodelevel(g_root_inode, &info);
|
||||
ret = foreach_inodelevel(g_root_inode->i_child, &info);
|
||||
inode_semgive();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue