Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Parent directory has inode locked exclusive. This is one* and only case when ->lookup() gets called on non in-lookup* dentries - as the matter of fact, this only gets called* when directory is guaranteed to have no in-lookup children* at all.

Proto:static struct dentry *__lookup_hash(const struct qstr *name, struct dentry *base, unsigned int flags)

Type:struct dentry

Parameter:

TypeParameterName
const struct qstr *name
struct dentry *base
unsigned intflags
1531  dentry = This looks up the name in dcache and possibly revalidates the found dentry.* NULL is returned if the dentry does not exist in the cache.
1533  dir = Where the name belongs to - NULL is * negative
1535  If dentry Then Return dentry
1539  If Value for the false possibility is greater at compile time(IS_DEADDIR(dir)) Then Return ERR_PTR( - ENOENT)
1542  dentry = allocate a dcache entry
1543  If Value for the false possibility is greater at compile time(!dentry) Then Return ERR_PTR( - ENOMEM)
1546  old = lookup(dir, dentry, flags)
1547  If Value for the false possibility is greater at compile time(old) Then
1548  dput(dentry)
1549  dentry = old
1551  Return dentry
Caller
NameDescribe
kern_path_lockeddoes lookup, returns the object with parent locked
filename_create
do_rmdir
do_unlinkatMake sure that the actual truncation of the file will occur outside its* directory's i_mutex. Truncate can take a long time if there is a lot of* writeout happening, and we don't want to prevent access to the directory* while waiting on the I/O.
do_renameat2