mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 07:03:22 +00:00
new: devfs删除文件夹
This commit is contained in:
19
kernel/filesystem/VFS/dcache.c
Normal file
19
kernel/filesystem/VFS/dcache.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include "internal.h"
|
||||
|
||||
/**
|
||||
* @brief 释放dentry
|
||||
*
|
||||
* @param dentry 目标dentry
|
||||
*/
|
||||
void vfs_dentry_put(struct vfs_dir_entry_t * dentry)
|
||||
{
|
||||
// todo: 加锁、放锁
|
||||
|
||||
list_del(&dentry->child_node_list);// 从父dentry中删除
|
||||
|
||||
// todo: 清除子目录的dentry
|
||||
|
||||
dentry->dir_ops->release(dentry);
|
||||
|
||||
kfree(dentry);
|
||||
}
|
Reference in New Issue
Block a user