Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:char *d_path(const struct path *path, char *buf, int buflen)

Type:char

Parameter:

TypeParameterName
const struct path *path
char *buf
intbuflen
260  res = buf + buflen
275  If d_op && d_dname && ( Not 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 ) Then Return 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  If error < 0 Then res = ERR_PTR(error)
286  Return res
Caller
NameDescribe
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