!92 fix bad code in fs codes

Merge pull request !92 from 野生毛霉君/master
This commit is contained in:
openharmony_ci
2021-03-30 09:49:11 +08:00
committed by Gitee
8 changed files with 25 additions and 10 deletions

View File

@@ -470,7 +470,7 @@ int VfsJffs2Readdir(struct Vnode *pVnode, struct fs_dirent_s *dir)
LOS_MuxLock(&g_jffs2FsLock, (uint32_t)JFFS2_WAITING_FOREVER);
/* set jffs2_d */
while (i < MAX_DIRENT_NUM && i < dir->read_cnt) {
while (i < dir->read_cnt) {
ret = jffs2_readdir((struct jffs2_inode *)pVnode->data, &dir->fd_position,
&dir->fd_int_offset, &dir->fd_dir[i]);
if (ret) {