函数逻辑报告 |
Source Code:fs\namei.c |
Create Date:2022-07-29 10:35:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_renameat2
函数原型:static int do_renameat2(int olddfd, const char __user *oldname, int newdfd, const char __user *newname, unsigned int flags)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
int | olddfd | |
const char __user * | oldname | |
int | newdfd | |
const char __user * | newname | |
unsigned int | flags |
4467 | struct inode * delegated_inode = NULL |
4471 | bool should_retry = false |
4474 | 如果flags按位与Don't overwrite target 按位或Exchange source and dest 按位或Whiteout source 的值的反则返回:负EINVAL |
4477 | 如果flags按位与Don't overwrite target 按位或Whiteout source 的值且flags按位与Exchange source and dest 则返回:负EINVAL |
4481 | 如果flags按位与Whiteout source 且非操作权限检查则返回:负EPERM |
4484 | 如果flags按位与Exchange source and dest 则target_flags等于0 |
4487 | retry : |
4488 | from等于filename_parentat(olddfd, getname(oldname), lookup_flags, & old_path, & old_last, & old_type) |
4490 | 如果是错误则 |
4495 | to等于filename_parentat(newdfd, getname(newname), lookup_flags, & new_path, & new_last, & new_type) |
4497 | 如果是错误则 |
4510 | 如果flags按位与Don't overwrite target 则error等于负EEXIST |
4515 | error等于mnt_want_write(mnt) |
4519 | retry_deleg : |
4528 | 如果d_is_negative(old_dentry)则转到:exit4 |
4535 | 如果flags按位与Don't overwrite target 且d_is_positive(new_dentry)则转到:exit5 |
4537 | 如果flags按位与Exchange source and dest 则 |
4539 | 如果d_is_negative(new_dentry)则转到:exit5 |
4542 | 如果非d_is_dir(new_dentry)则 |
4549 | 如果非d_is_dir(old_dentry)则 |
4553 | 如果非flags按位与Exchange source and dest 的值且name[len]则转到:exit5 |
4558 | 如果old_dentry恒等于trap则转到:exit5 |
4561 | 如果非flags按位与Exchange source and dest 的值则error等于负ENOTEMPTY |
4563 | 如果new_dentry恒等于trap则转到:exit5 |
4566 | error等于security_path_rename( & old_path, old_dentry, & new_path, new_dentry, flags) |
4573 | exit5 : |
4574 | dput(new_dentry) |
4575 | exit4 : |
4576 | dput(old_dentry) |
4577 | exit3 : |
4578 | unlock_rename(dentry, dentry) |
4579 | 如果delegated_inode则 |
4580 | error等于break_deleg_wait( & delegated_inode) |
4581 | 如果非error则转到:retry_deleg |
4584 | mnt_drop_write(mnt) |
4585 | exit2 : |
4590 | exit1 : |
4593 | 如果should_retry则 |
4598 | exit : |
4599 | 返回:error |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |