函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:chroot_fs_refs

函数原型:void chroot_fs_refs(const struct path *old_root, const struct path *new_root)

返回类型:void

参数:

类型参数名称
const struct path *old_root
const struct path *new_root
62  count等于0
64  read_lock( & tasklist_lock)
65  Careful: do_each_thread/while_each_thread is a double loop so* 'break' will not work as expected - use goto instead.(g, p)
66  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
67  fs等于文件系统信息
68  如果fs
69  hits等于0
72  hits加等于replace_path( & root, old_root, new_root)
73  hits加等于replace_path( & pwd, old_root, new_root)
75 hits自减循环
81  task_unlock(p)
83  read_unlock( & tasklist_lock)
84 count自减循环
85  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.
调用者
名称描述
SYSCALL_DEFINE2pivot_root Semantics:* Moves the root file system of the current process to the directory put_old,* makes new_root as the new root file system of the current process, and sets* root/cwd of all processes which had them on the current root to new_root