函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:int vfs_readlink(struct dentry *dentry, char __user *buffer, int buflen)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
char __user *buffer
intbuflen
4660  inode等于获得目录项的索引节点
4665  如果此条件成立可能性小(为编译器优化)(!(i_opflags & IOP_DEFAULT_READLINK))则
4666  如果此条件成立可能性小(为编译器优化)(readlink)则返回:readlink(dentry, buffer, buflen)
4669  如果非d_is_symlink(dentry)则返回:负EINVAL
4672  加自旋锁
4673  i_opflags或等于IOP_DEFAULT_READLINK
4674  自旋锁解锁
4677  link等于READ_ONCE(i_link)
4678  如果非link
4679  link等于get_link(dentry, inode, & done)
4680  如果是错误则返回:错误
4683  res等于readlink_copy(buffer, buflen, link)
4684  do_delayed_call( & done)
4685  返回:res