Function report |
Source Code:fs\namei.c |
Create Date:2022-07-28 20:05:09 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Check whether we can remove a link victim from directory dir, check* whether the type of victim is right.* 1. We can't do it if dir is read-only (done in permission())* 2. We should have write and exec permissions on dir* 3
Proto:static int may_delete(struct inode *dir, struct dentry *victim, bool isdir)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | dir | |
struct dentry * | victim | |
bool | isdir |
2739 | If d_is_negative(victim) Then Return -ENOENT |
2749 | audit_inode_child(dir, victim, a child being deleted ) |
2757 | If check_sticky(dir, inode) || IS_APPEND(inode) || IS_IMMUTABLE(inode) || IS_SWAPFILE(inode) || HAS_UNMAPPED_ID(inode) Then Return -EPERM |
2760 | If isdir Then |
2767 | If IS_DEADDIR(dir) Then Return -ENOENT |
2769 | If protected by d_lock & DCACHE_NFSFS_RENAMED Then Return -EBUSY |
2771 | Return 0 |
Name | Describe |
---|---|
vfs_rmdir | |
vfs_unlink | vfs_unlink - unlink a filesystem object*@dir: parent directory*@dentry: victim*@delegated_inode: returns victim inode, if the inode is delegated.* The caller must hold dir->i_mutex.* If vfs_unlink discovers a delegation, it will return -EWOULDBLOCK and |
vfs_rename | vfs_rename - rename a filesystem object*@old_dir: parent of source*@old_dentry: source*@new_dir: parent of destination*@new_dentry: destination*@delegated_inode: returns an inode needing a delegation break*@flags: rename flags |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |