Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vfs_readlink - copy symlink body into userspace buffer*@dentry: dentry on which to get symbolic link*@buffer: user memory pointer*@buflen: size of buffer* Does not touch atime. That's up to the caller if necessary* Does not call security hook.

Proto:int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
char __user *buffer
intbuflen
4660  inode = d_inode - Get the actual inode of this dentry*@dentry: The dentry to query* This is the helper normal filesystems should use to get at their own inodes* in their own dentries and ignore the layering superimposed upon them.
4665  If Value for the false possibility is greater at compile time(!(i_opflags & IOP_DEFAULT_READLINK)) Then
4666  If Value for the false possibility is greater at compile time(readlink) Then Return readlink(dentry, buffer, buflen)
4669  If Not d_is_symlink(dentry) Then Return -EINVAL
4672  spin_lock( & _blocks, i_bytes, maybe i_size )
4673  i_opflags |= IOP_DEFAULT_READLINK
4674  spin_unlock( & _blocks, i_bytes, maybe i_size )
4677  link = READ_ONCE(i_link)
4678  If Not link Then
4679  link = get_link(dentry, inode, & done)
4680  If IS_ERR(link) Then Return PTR_ERR(link)
4683  res = readlink_copy(buffer, buflen, link)
4684  do_delayed_call( & done)
4685  Return res