mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 14:16:33 +00:00
删除文件夹时回收dentry缓存
This commit is contained in:
@ -75,6 +75,7 @@ struct vfs_index_node_t
|
||||
uint64_t file_size; // 文件大小
|
||||
uint64_t blocks; // 占用的扇区数
|
||||
uint64_t attribute;
|
||||
int32_t ref_count; // 引用计数
|
||||
|
||||
struct vfs_superblock_t *sb;
|
||||
struct vfs_file_operations_t *file_ops;
|
||||
@ -220,6 +221,13 @@ int vfs_init();
|
||||
*/
|
||||
struct vfs_dir_entry_t *vfs_alloc_dentry(const int name_size);
|
||||
|
||||
/**
|
||||
* @brief 分配inode并将引用计数初始化为1
|
||||
*
|
||||
* @return struct vfs_index_node_t * 分配得到的inode
|
||||
*/
|
||||
struct vfs_index_node_t * vfs_alloc_inode();
|
||||
|
||||
/**
|
||||
* @brief 打开文件
|
||||
*
|
||||
|
Reference in New Issue
Block a user