Home
last modified time | relevance | path

Searched refs:dir_inode (Results 1 – 12 of 12) sorted by relevance

/DragonOS-0.1.2/kernel/src/filesystem/devfs/
Dinternal.h58 if (target_dent->dir_inode->attribute & VFS_IF_DIR) // 名称相符且为目录,则返回dentry in __devfs_find_dir()
74 dentry->dir_inode = inode; in __devfs_fill_inode()
75 dentry->dir_inode->file_ops = private_inode_data->f_ops; in __devfs_fill_inode()
76 dentry->dir_inode->inode_ops = &devfs_inode_ops; in __devfs_fill_inode()
78 dentry->dir_inode->private_inode_info = private_inode_data; in __devfs_fill_inode()
79 dentry->dir_inode->sb = &devfs_sb; in __devfs_fill_inode()
80 dentry->dir_inode->attribute = inode_attr; in __devfs_fill_inode()
82 private_inode_data->inode = dentry->dir_inode; in __devfs_fill_inode()
Ddevfs.c107 if (target_dent->dir_inode->attribute & VFS_IF_DIR) in devfs_readdir()
159 dEntry->dir_inode = vfs_alloc_inode(); in devfs_mkdir()
160 dEntry->dir_inode->file_ops = &devfs_file_ops; in devfs_mkdir()
161 dEntry->dir_inode->inode_ops = &devfs_inode_ops; in devfs_mkdir()
164 dEntry->dir_inode->private_inode_info = NULL; in devfs_mkdir()
165 dEntry->dir_inode->sb = &devfs_sb; in devfs_mkdir()
166 dEntry->dir_inode->attribute = VFS_IF_DIR; in devfs_mkdir()
194 devfs_root_dentry->dir_inode = vfs_alloc_inode(); in __devfs_init_root_inode()
195 devfs_root_dentry->dir_inode->file_ops = &devfs_file_ops; in __devfs_init_root_inode()
196 devfs_root_dentry->dir_inode->inode_ops = &devfs_inode_ops; in __devfs_init_root_inode()
[all …]
/DragonOS-0.1.2/kernel/src/filesystem/VFS/
Ddcache.c71 spin_lock(&dentry->dir_inode->lockref.lock); in vfs_dentry_put()
72 retval = vfs_free_inode(dentry->dir_inode); in vfs_dentry_put()
75 spin_unlock(&dentry->dir_inode->lockref.lock); in vfs_dentry_put()
95 spin_lock(&dentry->dir_inode->lockref.lock); in vfs_dentry_put()
96 retval = vfs_free_inode(dentry->dir_inode); in vfs_dentry_put()
99 spin_unlock(&dentry->dir_inode->lockref.lock); in vfs_dentry_put()
DVFS.c179 if (parent->dir_inode->inode_ops->lookup(parent->dir_inode, dentry) == NULL) in vfs_path_walk()
315 spin_lock(&parent_dir->dir_inode->lockref.lock); in vfs_mkdir()
316 retval = parent_dir->dir_inode->inode_ops->mkdir(parent_dir->dir_inode, subdir_dentry, 0); in vfs_mkdir()
317 spin_unlock(&parent_dir->dir_inode->lockref.lock); in vfs_mkdir()
449 spin_lock(&parent_dentry->dir_inode->lockref.lock); in do_open()
451 …uint64_t retval = parent_dentry->dir_inode->inode_ops->create(parent_dentry->dir_inode, dentry, 0); in do_open()
452 spin_unlock(&parent_dentry->dir_inode->lockref.lock); // 解锁inode in do_open()
488 if ((flags & O_DIRECTORY) && (dentry->dir_inode->attribute != VFS_IF_DIR)) in do_open()
501 file_ptr->file_ops = dentry->dir_inode->file_ops; in do_open()
505 errcode = file_ptr->file_ops->open(dentry->dir_inode, file_ptr); in do_open()
[all …]
Dinternal.h18 #define D_ISDIR(dentry) ((dentry)->dir_inode->attribute & VFS_IF_DIR)
DVFS.h54 struct vfs_index_node_t *dir_inode; member
/DragonOS-0.1.2/kernel/src/filesystem/rootfs/
Drootfs.c74 uint32_t dentry_type = target_dent->dir_inode->attribute; in rootfs_readdir()
151 dentry->dir_inode = vfs_alloc_inode(); in rootfs_init()
152 dentry->dir_inode->sb = &rootfs_sb; in rootfs_init()
153 dentry->dir_inode->inode_ops = &rootfs_inode_ops; in rootfs_init()
154 dentry->dir_inode->file_ops = &rootfs_file_ops; in rootfs_init()
155 dentry->dir_inode->attribute = VFS_IF_DIR; in rootfs_init()
184 if (tmp->dir_inode != NULL) in rootfs_migrate()
226 kfree(rootfs_sb.root->dir_inode); in rootfs_umount()
/DragonOS-0.1.2/kernel/src/filesystem/procfs/
Dprocfs.c232 struct vfs_index_node_t *inode = file_ptr->dEntry->dir_inode; in procfs_lseek()
244 pos = file_ptr->dEntry->dir_inode->file_size + offset; in procfs_lseek()
252 if (pos < 0 || pos > file_ptr->dEntry->dir_inode->file_size) in procfs_lseek()
292 if (target_dent->dir_inode->attribute & VFS_IF_DIR) in procfs_readdir()
347 if (dest_dEntry->dir_inode != NULL) in procfs_create()
351 dest_dEntry->dir_inode = inode; in procfs_create()
387 dEntry->dir_inode = inode; in procfs_mkdir()
421 procfs_root_dentry->dir_inode = vfs_alloc_inode(); in __procfs_init_root_inode()
422 procfs_root_dentry->dir_inode->file_ops = &procfs_file_ops; in __procfs_init_root_inode()
423 procfs_root_dentry->dir_inode->inode_ops = &procfs_inode_ops; in __procfs_init_root_inode()
[all …]
/DragonOS-0.1.2/kernel/src/filesystem/fat32/
Dfat32.c358 dest_dentry->dir_inode = p; in fat32_lookup()
426 sb_ptr->root->dir_inode = vfs_alloc_inode(); in fat32_read_superblock()
427 sb_ptr->root->dir_inode->inode_ops = &fat32_inode_ops; in fat32_read_superblock()
428 sb_ptr->root->dir_inode->file_ops = &fat32_file_ops; in fat32_read_superblock()
429 sb_ptr->root->dir_inode->file_size = 0; in fat32_read_superblock()
431 sb_ptr->root->dir_inode->blocks = in fat32_read_superblock()
432 (sb_ptr->root->dir_inode->file_size + fsbi->bytes_per_clus - 1) / fsbi->bytes_per_sec; in fat32_read_superblock()
433 sb_ptr->root->dir_inode->attribute = VFS_IF_DIR; in fat32_read_superblock()
434 sb_ptr->root->dir_inode->sb = sb_ptr; // 反向绑定对应的超级块 in fat32_read_superblock()
437 sb_ptr->root->dir_inode->private_inode_info = kmalloc(sizeof(struct fat32_inode_info_t), 0); in fat32_read_superblock()
[all …]
Dfat_ent.c344 if (dEntry->dir_inode->attribute & VFS_IF_DIR) in fat32_fill_shortname()
362 struct vfs_index_node_t *inode = dEntry->dir_inode; in fat32_fill_shortname()
367 target->DIR_FileSize = dEntry->dir_inode->file_size; in fat32_fill_shortname()
/DragonOS-0.1.2/kernel/src/process/
Dprocess.c142 if (dentry->dir_inode->attribute == VFS_IF_DIR) in process_open_exec_file()
153 filp->file_ops = dentry->dir_inode->file_ops; in process_open_exec_file()
/DragonOS-0.1.2/kernel/src/syscall/
Dsyscall.c413 if (dentry->dir_inode->attribute != VFS_IF_DIR) in sys_chdir()