删除文件夹时回收dentry缓存

This commit is contained in:
fslongjin
2022-09-13 16:17:35 +08:00
parent 9f2b080cda
commit 26eebaf03a
10 changed files with 132 additions and 63 deletions

View File

@ -1,5 +1,7 @@
#include "chardev.h"
#include "internal.h"
#include <filesystem/VFS/VFS.h>
#include <common/mutex.h>
#include <common/stdlib.h>
#include <common/string.h>
@ -55,7 +57,7 @@ int __devfs_chardev_register(struct devfs_private_inode_info_t *private_info, st
struct vfs_dir_entry_t *dentry = vfs_alloc_dentry(namelen + 1);
__devfs_fill_dentry(dentry, devname);
__devfs_fill_inode(dentry, __devfs_alloc_inode(), VFS_IF_DEVICE, private_info);
__devfs_fill_inode(dentry, vfs_alloc_inode(), VFS_IF_DEVICE, private_info);
// 将dentry挂载到char文件夹下
__devfs_dentry_bind_parent(chardev_folder_dentry, dentry);