fix fs_dispatch 中 pmo 执行完成后没有释放
This commit is contained in:
parent
84ad820223
commit
b5d6e2c20b
@ -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);
|
||||
|
@ -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:{
|
||||
|
Loading…
x
Reference in New Issue
Block a user