fix fs_dispatch 中 pmo 执行完成后没有释放

This commit is contained in:
KAAAsS 2022-04-21 00:54:47 +08:00
parent 84ad820223
commit b5d6e2c20b
Signed by: KAAAsS
GPG Key ID: D22F53AF662411FE
2 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,6 @@ int fs_read_all(char *path, void **ret_buf)
*ret_buf = buf;
// 读入文件
// FIXME: 读取 1 页以上会遇到 warning: vmr overlap
int pos = 0;
while (size - pos > 0) {
int cur = fs_read(path, pos, PAGE_SIZE);

View File

@ -52,6 +52,7 @@ static void fs_dispatch(ipc_msg_t * ipc_msg)
break;
}
ret = fs_server_write(fr->path, fr->offset, fr->buff, fr->count);
usys_unmap_pmo(SELF_CAP, cap, (u64) fr->buff);
break;
}
case FS_REQ_READ:{
@ -61,6 +62,7 @@ static void fs_dispatch(ipc_msg_t * ipc_msg)
break;
}
ret = fs_server_read(fr->path, fr->offset, fr->buff, fr->count);
usys_unmap_pmo(SELF_CAP, cap, (u64) fr->buff);
break;
}
case FS_REQ_GET_SIZE:{