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:
Xiang Xiao 2020-09-30 17:11:56 +08:00 committed by Alin Jerpelea
parent 73f0530912
commit b422f49fa7
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}