函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Write full pathname from the root of the filesystem into the buffer.

函数原型:static char *__dentry_path(struct dentry *d, char *buf, int buflen)

返回类型:char

参数:

类型参数名称
struct dentry *d
char *buf
intbuflen
329  seq等于0
330  error等于0
332  如果buflen小于2则转到:Elong
335  _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
336  restart :
337  dentry等于d
338  end等于bufbuflen
339  len等于buflen
340  prepend( & end, & len, "\0", 1)
342  retval等于end减1
343  retval等于'/'
344  ad_seqbegin_or_lock - begin a sequence number check or locking block*@lock: sequence lock*@seq : sequence number to be checked* First try it once optimistically without taking the lock. If that fails,* take the lock
345  当非linux/include/linux/dcache.h* Dirent cache data structures* (C) Copyright 1997 Thomas Schoebel-Theuer,* with heavy changes by Linus Torvalds(dentry)循环
346  parent等于 parent directory
348  Prefetch instructions for Pentium III (+) and AMD Athlon (+)* It's not worth to care about 3dnow prefetches for the K6* because they are microcoded there and very slow.
349  error等于prepend_name - prepend a pathname in front of current buffer pointer*@buffer: buffer pointer*@buflen: allocated length of the buffer*@name: name string and length qstr structure* With RCU path tracing, it may race with d_move()
350  如果error退出
353  retval等于end
354  dentry等于parent
356  如果非seq按位与1的值则_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()
358  如果need_seqretry( & rename_lock, seq)则
359  seq等于1
360  转到:restart
362  done_seqretry( & rename_lock, seq)
363  如果error则转到:Elong
365  返回:retval
366  Elong :
367  返回:错误号
调用者
名称描述
dentry_path_raw
dentry_path