Move FS things to PosixThread

This commit is contained in:
Ruihan Li
2024-12-01 11:41:23 +08:00
committed by Tate, Hongliang Tian
parent fe7e4884c9
commit 36fc1d3757
65 changed files with 268 additions and 215 deletions

View File

@ -11,7 +11,7 @@ pub fn sys_chroot(path_ptr: Vaddr, ctx: &Context) -> Result<SyscallReturn> {
let path = ctx.user_space().read_cstring(path_ptr, MAX_FILENAME_LEN)?;
debug!("path = {:?}", path);
let mut fs = ctx.process.fs().write();
let mut fs = ctx.posix_thread.fs().resolver().write();
let dentry = {
let path = path.to_string_lossy();
if path.is_empty() {