严格代码检查,修复大量错误,以及diskio.c ioctl参数大小导致的卡死问题

This commit is contained in:
zhangzheng
2025-03-23 17:35:56 +08:00
parent 749e24ddb7
commit 54b6bc9c24
139 changed files with 1317 additions and 1077 deletions

View File

@@ -43,7 +43,6 @@ int fd_map_alloc(uint32_t svr_fd, uint32_t priv_fd, enum fd_type type)
{
int alloc_fd = 0;
again_alloc:
pthread_spin_lock(&fd_map.lock);
if (fd_map.free_fd >= FD_MAP_TOTAL)
{
@@ -142,6 +141,7 @@ int fd_map_update(int fd, fd_map_entry_t *new_entry)
fd_map.row[row_inx]->entry[inx] = *new_entry;
fd_map.row[row_inx]->entry[inx].flags = flags;
pthread_spin_unlock(&fd_map.lock);
return 0;
}
/**
* @brief 释放fd