Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Attempt to atomically look up, create and open a file from a negative* dentry

Proto: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)

Type:int

Parameter:

TypeParameterName
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  If Not ( ~open_flag & (O_EXCL | O_CREAT)) Then open_flag &= ~O_TRUNC
3011  If flags & quire a directory Then 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  If Not error Then
3020  If f_mode & FMODE_OPENED Then
3025  acc_mode = acc_mode
3026  If f_mode & FMODE_CREATED Then
3032  If WARN_ON(error > 0) Then error = -EINVAL
3034  Else if WARN_ON(dentry == DENTRY_NOT_SET) Then
3035  error = -EIO
3036  Else
3037  If dentry Then
3038  dput(dentry)
3039  dentry = dentry
3044  error = -ENOENT
3045  Else
3046  dentry = dentry
3047  mnt = mnt
3048  Return 0
3052  dput(dentry)
3053  Return error
Caller
NameDescribe
lookup_openLook up and maybe create and open the last component