函数逻辑报告 |
Source Code:fs\namei.c |
Create Date:2022-07-29 10:35:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, struct inode **delegated_inode, unsigned int flags)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct inode * | old_dir | |
struct dentry * | old_dentry | |
struct inode * | new_dir | |
struct dentry * | new_dentry | |
struct inode ** | delegated_inode | |
unsigned int | flags |
4339 | is_dir等于d_is_dir(old_dentry) |
4342 | bool new_is_dir = false |
4343 | max_links等于s_max_links |
4353 | 如果非target则 |
4355 | 否则 |
4356 | new_is_dir等于d_is_dir(new_dentry) |
4374 | 如果is_dir则 |
4379 | 如果flags按位与Exchange source and dest 且new_is_dir则 |
4386 | error等于security_inode_rename(old_dir, old_dentry, new_dir, new_dentry, flags) |
4391 | take_dentry_name_snapshot( & old_name, old_dentry) |
4392 | 获得目录项引用 |
4393 | 如果非is_dir或flags按位与Exchange source and dest 则lock_two_nondirectories(source, target) |
4395 | 否则如果target则inode_lock(target) |
4399 | 如果is_local_mountpoint(old_dentry)或is_local_mountpoint(new_dentry)则转到:out |
4404 | 如果is_dir且非new_is_dir且i_nlink大于等于max_links则转到:out |
4406 | 如果flags按位与Exchange source and dest 且非is_dir且new_is_dir且i_nlink大于等于max_links则转到:out |
4410 | 如果非is_dir则 |
4411 | error等于try_break_deleg(source, delegated_inode) |
4415 | 如果target且非new_is_dir则 |
4416 | error等于try_break_deleg(target, delegated_inode) |
4420 | error等于rename(old_dir, old_dentry, new_dir, new_dentry, flags) |
4425 | 如果非flags按位与Exchange source and dest 的值且target则 |
4433 | 如果非fs_flags按位与FS will handle d_move() during rename() internally. 的值则 |
4434 | 如果非flags按位与Exchange source and dest 的值则改变目录项 |
4436 | 否则d_exchange(old_dentry, new_dentry) |
4439 | out : |
4440 | 如果非is_dir或flags按位与Exchange source and dest 则unlock_two_nondirectories(source, target) |
4442 | 否则如果target则inode_unlock(target) |
4444 | dput(new_dentry) |
4445 | 如果非error则 |
4448 | 如果flags按位与Exchange source and dest 则 |
4453 | release_dentry_name_snapshot( & old_name) |
4455 | 返回:error |
名称 | 描述 |
---|---|
do_renameat2 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |