new: rootfs

This commit is contained in:
fslongjin
2022-09-14 23:48:19 +08:00
parent c80f572db7
commit 72f9c430c5
12 changed files with 322 additions and 43 deletions

View File

@ -57,4 +57,20 @@ static inline void detach_mounts(struct vfs_dir_entry_t *dentry)
// todo:如果当前文件夹是一个挂载点则对同样挂载在当前文件夹下的dentry进行清理。以免造成内存泄露
// 可参考 linux5.17或以上的detach_mounts()函数
}
}
/**
* @brief 根据mountpoint的父目录dentry查找第一个符合条件的mountpoint结构体
*
* @param dentry 父dentry
* @return struct mountpoint* 第一个符合条件的mountpoint结构体的指针
*/
struct mountpoint *mount_find_mnt_list_by_parent(struct vfs_dir_entry_t *dentry);
/**
* @brief 释放挂载点结构体
*
* @param mp mountpoint结构体
* @return int 错误码
*/
int mount_release_mountpoint(struct mountpoint* mp);