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:Write full pathname from the root of the filesystem into the buffer.

Proto:static char *__dentry_path(struct dentry *d, char *buf, int buflen)

Type:char

Parameter:

TypeParameterName
struct dentry *d
char *buf
intbuflen
329  seq = 0
330  error = 0
332  If buflen < 2 Then Go to 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 = buf + buflen
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  When Not linux/include/linux/dcache.h* Dirent cache data structures* (C) Copyright 1997 Thomas Schoebel-Theuer,* with heavy changes by Linus Torvalds(dentry) cycle
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  If error Then Break
353  retval = end
354  dentry = parent
356  If Not (seq & 1) Then _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  If need_seqretry( & rename_lock, seq) Then
359  seq = 1
360  Go to restart
362  done_seqretry( & rename_lock, seq)
363  If error Then Go to Elong
365  Return retval
366  Elong :
367  Return ERR_PTR( - ENAMETOOLONG)
Caller
NameDescribe
dentry_path_raw
dentry_path