Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:does lookup, returns the object with parent locked

Proto:struct dentry *kern_path_locked(const char *name, struct path *path)

Type:struct dentry

Parameter:

TypeParameterName
const char *name
struct path *path
2400  filename = filename_parentat(Special value used to indicateopenat should use the currentworking directory. , getname_kernel(name), 0, path, & last, & type)
2402  If IS_ERR(filename) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
2404  If Value for the false possibility is greater at compile time(type != LAST_NORM) Then
2405  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
2406  putname(filename)
2407  Return ERR_PTR( - EINVAL)
2409  inode_lock_nested( Where the name belongs to - NULL is * negative , I_MUTEX_PARENT)
2410  d = 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.
2411  If IS_ERR(d) Then
2412  inode_unlock( Where the name belongs to - NULL is * negative )
2413  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
2415  putname(filename)
2416  Return d
Caller
NameDescribe
audit_alloc_mark