!1010 fix: 修复内核告警

Merge pull request !1010 from zhangdengyu/cherry-pick-1664183802
This commit is contained in:
openharmony_ci 2022-09-26 12:52:33 +00:00 committed by Gitee
commit 91cea8aae0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -581,8 +581,11 @@ static OsBcacheBlock *AllocNewBlock(OsBcache *bc, BOOL read, UINT64 num)
DelBlock(bc, prefer);
}
if (prefer->used) { /* do not combine with next check */
MergeSyncBlocks(bc, prefer); /* prefer->used may be changed here */
}
if (prefer->used) {
MergeSyncBlocks(bc, prefer);
BcacheSyncBlock(bc, prefer);
DelBlock(bc, prefer);
}

View File

@ -260,7 +260,7 @@ int VnodeDrop(void)
static char *NextName(char *pos, uint8_t *len)
{
char *name = NULL;
while (*pos == '/') {
while (*pos != 0 && *pos == '/') {
pos++;
}
if (*pos == '\0') {