函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:open_detached_copy

函数原型:static struct file *open_detached_copy(struct path *path, bool recursive)

返回类型:struct file

参数:

类型参数名称
struct path *path
boolrecursive
2322  user_ns等于user_ns
2323  ns等于alloc_mnt_ns(user_ns, true)
2327  如果是错误则返回:错误指示
2330  namespace_lock()
2331  mnt等于__do_loopback(path, recursive)
2332  如果是错误
2333  namespace_unlock()
2334  free_mnt_ns(ns)
2335  返回:错误指示
2338  lock_mount_hash()
2339 p循环
2340  containing namespace 等于ns
2341  # of mounts in the namespace 自加
2343  root等于mnt
2344  添加链表项
2345  mntget( & mnt)
2346  unlock_mount_hash()
2347  namespace_unlock()
2349  mntput(mnt)
2350  mnt等于mnt
2351  file等于dentry_open(path, O_PATH, current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
2352  如果是错误dissolve_on_fput(mnt)
2354  否则f_mode或等于File represents mount that needs unmounting
2356  返回:file
调用者
名称描述
SYSCALL_DEFINE3