函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:35:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Attempt to atomically look up, create and open a file from a negative* dentry

函数原型:static int atomic_open(struct nameidata *nd, struct dentry *dentry, struct path *path, struct file *file, const struct open_flags *op, int open_flag, umode_t mode)

返回类型:int

参数:

类型参数名称
struct nameidata *nd
struct dentry *dentry
struct path *path
struct file *file
const struct open_flags *op
intopen_flag
umode_tmode
3004  struct dentry * const DENTRY_NOT_SET = (void * ) - 1UL
3005  dir等于d_inode
3008  如果非open_flag的反按位与O_EXCL按位或O_CREAT的值的值则open_flag与等于O_TRUNC的反
3011  如果flags按位与quire a directory open_flag或等于O_DIRECTORY
3014  dentry等于DENTRY_NOT_SET
3015  mnt等于mnt
3016  error等于atomic_open(dir, dentry, file, open_to_namei_flags(open_flag), mode)
3018  d_lookup_done(dentry)
3019  如果非error
3020  如果f_mode按位与FMODE_OPENED
3025  acc_mode等于acc_mode
3026  如果f_mode按位与FMODE_CREATED
3031  error等于may_open( & f_path, acc_mode, open_flag)
3032  如果WARN_ON(error > 0)则error等于负EINVAL
3034  否则如果WARN_ON(dentry == DENTRY_NOT_SET)则
3035  error等于负EIO
3036  否则
3037  如果dentry
3038  dput(dentry)
3039  dentry等于dentry
3044  error等于负ENOENT
3045  否则
3046  dentry等于dentry
3047  mnt等于mnt
3048  返回:0
3052  dput(dentry)
3053  返回:error
调用者
名称描述
lookup_openLook up and maybe create and open the last component