函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:d_path - return the path of a dentry*@path: path to report*@buf: buffer to return value in*@buflen: buffer length* Convert a dentry into an ASCII path name

函数原型:char *d_path(const struct path *path, char *buf, int buflen)

返回类型:char

参数:

类型参数名称
const struct path *path
char *buf
intbuflen
260  res等于bufbuflen
275  如果d_opd_dname且非linux/include/linux/dcache.h* Dirent cache data structures* (C) Copyright 1997 Thomas Schoebel-Theuer,* with heavy changes by Linus Torvalds(dentry)或dentry不等于mnt_root的值则返回:d_dname(dentry, buf, buflen)
279  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
280  get_fs_root_rcu(fs, & root)
281  error等于same as __d_path but appends "(deleted)" for unlinked files.
282  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
284  如果error小于0则res等于错误号
286  返回:res
调用者
名称描述
mnt_warn_timestamp_expiry
seq_pathseq_path - seq_file interface to print a pathname*@m: the seq_file handle*@path: the struct path to print*@esc: set of characters to escape in the output* return the absolute path of 'path', as represented by the* dentry / mnt pair in the path parameter.
do_lookup_dcookieAnd here is where the userspace process can look up the cookie value* to retrieve the path.
seq_buf_pathseq_buf_path - copy a path into the sequence buffer*@s: seq_buf descriptor*@path: path to write into the sequence buffer
audit_log_d_pathThis is a helper-function to print the escaped d_path