函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Handle a dentry that is managed in some way.* - Flagged for transit management (autofs)* - Flagged as mountpoint* - Flagged as automount point* This may only be called in refwalk mode.* On success path->dentry is known positive.

函数原型:static int follow_managed(struct path *path, struct nameidata *nd)

返回类型:int

参数:

类型参数名称
struct path *path
struct nameidata *nd
1220  mnt等于mnt
1222  bool need_mntput = false
1223  ret等于0
1228 flags等于smp_load_acquire( & protected by d_lock ), 此条件成立可能性小(为编译器优化)(flags & DCACHE_MANAGED_DENTRY)循环
1232  如果flags按位与manage transit from this dirent
1233  BUG_ON(!d_op)
1234  BUG_ON(!d_manage)
1235  ret等于d_manage(path, false)
1237  如果ret小于0则退出
1242  如果flags按位与s a mountpoint
1243  mounted等于lookup_mnt(path)
1244  如果mounted
1245  dput(dentry)
1246  如果need_mntputmntput(mnt)
1248  mnt等于mounted
1250  need_mntput = true
1251  继续下一循环
1261  如果flags按位与handle automount on this dir
1263  如果ret小于0则退出
1265  继续下一循环
1269  退出
1272  如果need_mntputmnt恒等于mntmntput(mnt)
1274  如果need_mntputflags或等于LOOKUP_JUMPED
1276  如果ret恒等于负EISDIR或非retret等于1
1278  如果ret大于0且此条件成立可能性小(为编译器优化)(d_flags_negative(flags))则ret等于负ENOENT
1280  如果此条件成立可能性小(为编译器优化)(ret < 0)则path_put_conditional(path, nd)
1282  返回:ret
调用者
名称描述
lookup_fast
walk_component
handle_lookup_down
do_lastHandle the last step of open()